diff options
author | maxim <maxim@FreeBSD.org> | 2005-03-23 09:26:38 +0000 |
---|---|---|
committer | maxim <maxim@FreeBSD.org> | 2005-03-23 09:26:38 +0000 |
commit | 56ed6f8b753b402b2d38dac5fb7b45e05a60ace4 (patch) | |
tree | 6c39505092e930e4cbc2c432017c32c150311cb7 /sys/netinet/in_pcb.c | |
parent | b86551e8667db7f794531bca1d3cc35ace69dac5 (diff) | |
download | FreeBSD-src-56ed6f8b753b402b2d38dac5fb7b45e05a60ace4.zip FreeBSD-src-56ed6f8b753b402b2d38dac5fb7b45e05a60ace4.tar.gz |
o Document net.inet.ip.portrange.random* sysctls.
o Correct a comment about random port allocation threshold
implementation.
Reviewed by: silby, ru
MFC after: 3 days
Diffstat (limited to 'sys/netinet/in_pcb.c')
-rw-r--r-- | sys/netinet/in_pcb.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/sys/netinet/in_pcb.c b/sys/netinet/in_pcb.c index efdab89..3ff8615 100644 --- a/sys/netinet/in_pcb.c +++ b/sys/netinet/in_pcb.c @@ -148,12 +148,14 @@ SYSCTL_INT(_net_inet_ip_portrange, OID_AUTO, reservedhigh, CTLFLAG_RW|CTLFLAG_SECURE, &ipport_reservedhigh, 0, ""); SYSCTL_INT(_net_inet_ip_portrange, OID_AUTO, reservedlow, CTLFLAG_RW|CTLFLAG_SECURE, &ipport_reservedlow, 0, ""); -SYSCTL_INT(_net_inet_ip_portrange, OID_AUTO, randomized, - CTLFLAG_RW, &ipport_randomized, 0, ""); -SYSCTL_INT(_net_inet_ip_portrange, OID_AUTO, randomcps, - CTLFLAG_RW, &ipport_randomcps, 0, ""); -SYSCTL_INT(_net_inet_ip_portrange, OID_AUTO, randomtime, - CTLFLAG_RW, &ipport_randomtime, 0, ""); +SYSCTL_INT(_net_inet_ip_portrange, OID_AUTO, randomized, CTLFLAG_RW, + &ipport_randomized, 0, "Enable random port allocation"); +SYSCTL_INT(_net_inet_ip_portrange, OID_AUTO, randomcps, CTLFLAG_RW, + &ipport_randomcps, 0, "Maximum number of random port " + "allocations before switching to a sequental one"); +SYSCTL_INT(_net_inet_ip_portrange, OID_AUTO, randomtime, CTLFLAG_RW, + &ipport_randomtime, 0, "Minimum time to keep sequental port " + "allocation before switching to a random one"); /* * in_pcb.c: manage the Protocol Control Blocks. @@ -1211,7 +1213,8 @@ in_pcbsosetlabel(so) * allocation should be continued. If more than ipport_randomcps * ports have been allocated in the last second, then we return to * sequential port allocation. We return to random allocation only - * once we drop below ipport_randomcps for at least 5 seconds. + * once we drop below ipport_randomcps for at least ipport_randomtime + * seconds. */ void |