Make the default value of net.inet.ip.maxfragpackets and
net.inet6.ip6.maxfragpackets dependent on nmbclusters, defaulting to nmbclusters / 4 Reviewed by: bde MFC after: 1 week
This commit is contained in:
parent
09f8f5b259
commit
96c2b04290
@ -126,7 +126,7 @@ SYSCTL_INT(_net_inet_ip, IPCTL_KEEPFAITH, keepfaith, CTLFLAG_RW,
|
||||
"Enable packet capture for FAITH IPv4->IPv6 translater daemon");
|
||||
|
||||
static int ip_nfragpackets = 0;
|
||||
static int ip_maxfragpackets = 200;
|
||||
static int ip_maxfragpackets; /* initialized in ip_init() */
|
||||
SYSCTL_INT(_net_inet_ip, OID_AUTO, maxfragpackets, CTLFLAG_RW,
|
||||
&ip_maxfragpackets, 0,
|
||||
"Maximum number of IPv4 fragment reassembly queue entries");
|
||||
@ -254,7 +254,8 @@ ip_init()
|
||||
for (i = 0; i < IPREASS_NHASH; i++)
|
||||
TAILQ_INIT(&ipq[i]);
|
||||
|
||||
maxnipq = nmbclusters/4;
|
||||
maxnipq = nmbclusters / 4;
|
||||
ip_maxfragpackets = nmbclusters / 4;
|
||||
|
||||
#ifndef RANDOM_IP_ID
|
||||
ip_id = time_second & 0xffff;
|
||||
|
@ -81,6 +81,8 @@ frag6_init()
|
||||
{
|
||||
struct timeval tv;
|
||||
|
||||
ip6_maxfragpackets = nmbclusters / 4;
|
||||
|
||||
/*
|
||||
* in many cases, random() here does NOT return random number
|
||||
* as initialization during bootstrap time occur in fixed order.
|
||||
|
@ -286,7 +286,7 @@ int ip6_sendredirects = IPV6_SENDREDIRECTS;
|
||||
int ip6_defhlim = IPV6_DEFHLIM;
|
||||
int ip6_defmcasthlim = IPV6_DEFAULT_MULTICAST_HOPS;
|
||||
int ip6_accept_rtadv = 0; /* "IPV6FORWARDING ? 0 : 1" is dangerous */
|
||||
int ip6_maxfragpackets = 200;
|
||||
int ip6_maxfragpackets; /* initialized in frag6.c:frag6_init() */
|
||||
int ip6_log_interval = 5;
|
||||
int ip6_hdrnestlimit = 50; /* appropriate? */
|
||||
int ip6_dad_count = 1; /* DupAddrDetectionTransmits */
|
||||
|
Loading…
x
Reference in New Issue
Block a user