diff options
author | dwmalone <dwmalone@FreeBSD.org> | 2004-08-14 15:32:40 +0000 |
---|---|---|
committer | dwmalone <dwmalone@FreeBSD.org> | 2004-08-14 15:32:40 +0000 |
commit | 5df13d37b27b8510415fb500f01a289443950ebb (patch) | |
tree | 56a806b0847f95ede378bb97ce9bfcb595420ea2 /sys/netinet6/ip6_id.c | |
parent | 271672aa9c335d2a4944e53a99960718533d3f22 (diff) | |
download | FreeBSD-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/netinet6/ip6_id.c')
-rw-r--r-- | sys/netinet6/ip6_id.c | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/sys/netinet6/ip6_id.c b/sys/netinet6/ip6_id.c index ca193b8..cb75277 100644 --- a/sys/netinet6/ip6_id.c +++ b/sys/netinet6/ip6_id.c @@ -86,8 +86,6 @@ * This avoids reuse issues caused by reseeding. */ -#include "opt_random_ip_id.h" - #include <sys/types.h> #include <sys/param.h> #include <sys/kernel.h> @@ -100,8 +98,6 @@ #include <netinet/ip6.h> #include <netinet6/ip6_var.h> -#ifdef RANDOM_IP_ID - #ifndef INT32_MAX #define INT32_MAX 0x7fffffffU #endif @@ -267,5 +263,3 @@ ip6_randomflowlabel(void) return randomid(&randomtab_20) & 0xfffff; } - -#endif /* RANDOM_IP_ID */ |