From 5df13d37b27b8510415fb500f01a289443950ebb Mon Sep 17 00:00:00 2001 From: dwmalone Date: Sat, 14 Aug 2004 15:32:40 +0000 Subject: 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 --- sys/netinet6/ip6_var.h | 8 -------- 1 file changed, 8 deletions(-) (limited to 'sys/netinet6/ip6_var.h') diff --git a/sys/netinet6/ip6_var.h b/sys/netinet6/ip6_var.h index 99edc45..36bf36d 100644 --- a/sys/netinet6/ip6_var.h +++ b/sys/netinet6/ip6_var.h @@ -283,9 +283,6 @@ struct ip6aux { #define IPV6_MINMTU 0x04 /* use minimum MTU (IPV6_USE_MIN_MTU) */ extern struct ip6stat ip6stat; /* statistics */ -#ifndef RANDOM_IP_ID -extern u_int32_t ip6_id; /* fragment identifier */ -#endif extern int ip6_defhlim; /* default hop limit */ extern int ip6_defmcasthlim; /* default multicast hop limit */ extern int ip6_forwarding; /* act as router? */ @@ -309,9 +306,6 @@ extern time_t ip6_log_time; extern int ip6_hdrnestlimit; /* upper limit of # of extension headers */ extern int ip6_dad_count; /* DupAddrDetectionTransmits */ -#ifndef RANDOM_IP_ID -extern u_int32_t ip6_flow_seq; -#endif extern int ip6_auto_flowlabel; extern int ip6_auto_linklocal; @@ -399,10 +393,8 @@ struct in6_addr *in6_selectsrc __P((struct sockaddr_in6 *, int in6_selectroute __P((struct sockaddr_in6 *, struct ip6_pktopts *, struct ip6_moptions *, struct route_in6 *, struct ifnet **, struct rtentry **, int)); -#ifdef RANDOM_IP_ID u_int32_t ip6_randomid __P((void)); u_int32_t ip6_randomflowlabel __P((void)); -#endif #endif /* _KERNEL */ #endif /* !_NETINET6_IP6_VAR_H_ */ -- cgit v1.1