summaryrefslogtreecommitdiffstats
path: root/sys/netinet/tcp_syncache.c
diff options
context:
space:
mode:
authordwmalone <dwmalone@FreeBSD.org>2004-08-14 15:32:40 +0000
committerdwmalone <dwmalone@FreeBSD.org>2004-08-14 15:32:40 +0000
commit5df13d37b27b8510415fb500f01a289443950ebb (patch)
tree56a806b0847f95ede378bb97ce9bfcb595420ea2 /sys/netinet/tcp_syncache.c
parent271672aa9c335d2a4944e53a99960718533d3f22 (diff)
downloadFreeBSD-src-5df13d37b27b8510415fb500f01a289443950ebb.zip
FreeBSD-src-5df13d37b27b8510415fb500f01a289443950ebb.tar.gz
Get rid of the RANDOM_IP_ID option and make it a sysctl. NetBSD
have already done this, so I have styled the patch on their work: 1) introduce a ip_newid() static inline function that checks the sysctl and then decides if it should return a sequential or random IP ID. 2) named the sysctl net.inet.ip.random_id 3) IPv6 flow IDs and fragment IDs are now always random. Flow IDs and frag IDs are significantly less common in the IPv6 world (ie. rarely generated per-packet), so there should be smaller performance concerns. The sysctl defaults to 0 (sequential IP IDs). Reviewed by: andre, silby, mlaier, ume Based on: NetBSD MFC after: 2 months
Diffstat (limited to 'sys/netinet/tcp_syncache.c')
-rw-r--r--sys/netinet/tcp_syncache.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/sys/netinet/tcp_syncache.c b/sys/netinet/tcp_syncache.c
index 6ceff8f..9c918a9 100644
--- a/sys/netinet/tcp_syncache.c
+++ b/sys/netinet/tcp_syncache.c
@@ -38,7 +38,6 @@
#include "opt_inet6.h"
#include "opt_ipsec.h"
#include "opt_mac.h"
-#include "opt_random_ip_id.h"
#include "opt_tcpdebug.h"
#include "opt_tcp_sack.h"
@@ -958,11 +957,7 @@ syncache_add(inc, to, th, sop, m)
if (inc->inc_isipv6 &&
(sc->sc_tp->t_inpcb->in6p_flags & IN6P_AUTOFLOWLABEL)) {
sc->sc_flowlabel =
-#ifdef RANDOM_IP_ID
(htonl(ip6_randomflowlabel()) & IPV6_FLOWLABEL_MASK);
-#else
- (htonl(ip6_flow_seq++) & IPV6_FLOWLABEL_MASK);
-#endif
}
#endif
}
OpenPOWER on IntegriCloud