summaryrefslogtreecommitdiffstats
path: root/sys/contrib
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/contrib
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/contrib')
-rw-r--r--sys/contrib/pf/net/if_pfsync.c5
-rw-r--r--sys/contrib/pf/net/pf_norm.c4
2 files changed, 0 insertions, 9 deletions
diff --git a/sys/contrib/pf/net/if_pfsync.c b/sys/contrib/pf/net/if_pfsync.c
index e0bd244..1e2d7b1 100644
--- a/sys/contrib/pf/net/if_pfsync.c
+++ b/sys/contrib/pf/net/if_pfsync.c
@@ -30,7 +30,6 @@
#ifdef __FreeBSD__
#include "opt_inet.h"
#include "opt_inet6.h"
-#include "opt_random_ip_id.h"
#endif
#ifndef __FreeBSD__
@@ -107,10 +106,6 @@ struct pfsync_softc pfsyncif;
int pfsync_sync_ok;
struct pfsyncstats pfsyncstats;
-#ifndef RANDOM_IP_ID
-extern u_int16_t ip_randomid(void);
-#endif
-
#ifdef __FreeBSD__
/*
diff --git a/sys/contrib/pf/net/pf_norm.c b/sys/contrib/pf/net/pf_norm.c
index 42c834d..fcaeaa4 100644
--- a/sys/contrib/pf/net/pf_norm.c
+++ b/sys/contrib/pf/net/pf_norm.c
@@ -30,7 +30,6 @@
#ifdef __FreeBSD__
#include "opt_inet.h"
#include "opt_inet6.h"
-#include "opt_random_ip_id.h" /* or ip_var does not export it */
#include "opt_pf.h"
#define NPFLOG DEV_PFLOG
#else
@@ -168,9 +167,6 @@ RB_PROTOTYPE(pf_frag_tree, pf_fragment, fr_entry, pf_frag_compare);
RB_GENERATE(pf_frag_tree, pf_fragment, fr_entry, pf_frag_compare);
/* Private prototypes */
-#ifndef RANDOM_IP_ID
-extern u_int16_t ip_randomid(void);
-#endif
void pf_ip2key(struct pf_fragment *, struct ip *);
void pf_remove_fragment(struct pf_fragment *);
void pf_flush_fragments(void);
OpenPOWER on IntegriCloud