summaryrefslogtreecommitdiffstats
path: root/sys/netinet
diff options
context:
space:
mode:
authorluigi <luigi@FreeBSD.org>2010-01-07 10:08:05 +0000
committerluigi <luigi@FreeBSD.org>2010-01-07 10:08:05 +0000
commit6ea737556ed9121013e65ed97640cd0ad7488c34 (patch)
treef6767c7fe1813436eb29588ff5a157377e3a8d56 /sys/netinet
parentfd23c264ca9b5d28c0bb5f5eea31e08899573e7d (diff)
downloadFreeBSD-src-6ea737556ed9121013e65ed97640cd0ad7488c34.zip
FreeBSD-src-6ea737556ed9121013e65ed97640cd0ad7488c34.tar.gz
some header shuffling to help decoupling ip_divert from ipfw
Diffstat (limited to 'sys/netinet')
-rw-r--r--sys/netinet/ipfw/ip_dummynet.c4
-rw-r--r--sys/netinet/ipfw/ip_fw_log.c1
-rw-r--r--sys/netinet/ipfw/ip_fw_pfil.c8
-rw-r--r--sys/netinet/ipfw/ip_fw_sockopt.c3
-rw-r--r--sys/netinet/ipfw/ip_fw_table.c1
5 files changed, 6 insertions, 11 deletions
diff --git a/sys/netinet/ipfw/ip_dummynet.c b/sys/netinet/ipfw/ip_dummynet.c
index 7126ace..a6c14a8 100644
--- a/sys/netinet/ipfw/ip_dummynet.c
+++ b/sys/netinet/ipfw/ip_dummynet.c
@@ -52,8 +52,6 @@ __FBSDID("$FreeBSD$");
* 000601: WF2Q support
* 000106: large rewrite, use heaps to handle very many pipes.
* 980513: initial release
- *
- * include files marked with XXX are probably not needed
*/
#include <sys/param.h>
@@ -75,10 +73,10 @@ __FBSDID("$FreeBSD$");
#include <net/netisr.h>
#include <netinet/in.h>
#include <netinet/ip.h> /* ip_len, ip_off */
+#include <netinet/ip_var.h> /* ip_output(), IP_FORWARDING */
#include <netinet/ip_fw.h>
#include <netinet/ipfw/ip_fw_private.h>
#include <netinet/ip_dummynet.h>
-#include <netinet/ip_var.h> /* ip_output(), IP_FORWARDING */
#include <netinet/if_ether.h> /* various ether_* routines */
diff --git a/sys/netinet/ipfw/ip_fw_log.c b/sys/netinet/ipfw/ip_fw_log.c
index e9f05e7..a5178db 100644
--- a/sys/netinet/ipfw/ip_fw_log.c
+++ b/sys/netinet/ipfw/ip_fw_log.c
@@ -58,6 +58,7 @@ __FBSDID("$FreeBSD$");
#include <netinet/in.h>
#include <netinet/ip.h>
#include <netinet/ip_icmp.h>
+#include <netinet/ip_var.h>
#include <netinet/ip_fw.h>
#include <netinet/ipfw/ip_fw_private.h>
#include <netinet/tcp_var.h>
diff --git a/sys/netinet/ipfw/ip_fw_pfil.c b/sys/netinet/ipfw/ip_fw_pfil.c
index 1132109..d8ec0a3 100644
--- a/sys/netinet/ipfw/ip_fw_pfil.c
+++ b/sys/netinet/ipfw/ip_fw_pfil.c
@@ -73,12 +73,6 @@ static VNET_DEFINE(int, fw6_enable) = 1;
int ipfw_chg_hook(SYSCTL_HANDLER_ARGS);
-/* Divert hooks. */
-void (*ip_divert_ptr)(struct mbuf *m, int incoming);
-
-/* ng_ipfw hooks. */
-ng_ipfw_input_t *ng_ipfw_input_p = NULL;
-
/* Forward declarations. */
static int ipfw_divert(struct mbuf **, int, struct ipfw_rule_ref *, int);
@@ -219,7 +213,7 @@ again:
case IP_FW_NGTEE:
case IP_FW_NETGRAPH:
- if (!NG_IPFW_LOADED) {
+ if (ng_ipfw_input_p == NULL) {
ret = EACCES;
break; /* i.e. drop */
}
diff --git a/sys/netinet/ipfw/ip_fw_sockopt.c b/sys/netinet/ipfw/ip_fw_sockopt.c
index 10dd861..596324d 100644
--- a/sys/netinet/ipfw/ip_fw_sockopt.c
+++ b/sys/netinet/ipfw/ip_fw_sockopt.c
@@ -63,6 +63,7 @@ __FBSDID("$FreeBSD$");
#include <net/vnet.h>
#include <netinet/in.h>
+#include <netinet/ip_var.h> /* hooks */
#include <netinet/ip_fw.h>
#include <netinet/ipfw/ip_fw_private.h>
@@ -676,7 +677,7 @@ check_ipfw_struct(struct ip_fw *rule, int size)
goto check_size;
case O_NETGRAPH:
case O_NGTEE:
- if (!NG_IPFW_LOADED)
+ if (ng_ipfw_input_p == NULL)
return EINVAL;
else
goto check_size;
diff --git a/sys/netinet/ipfw/ip_fw_table.c b/sys/netinet/ipfw/ip_fw_table.c
index c4fd31b..0d8625a 100644
--- a/sys/netinet/ipfw/ip_fw_table.c
+++ b/sys/netinet/ipfw/ip_fw_table.c
@@ -64,6 +64,7 @@ __FBSDID("$FreeBSD$");
#include <net/vnet.h>
#include <netinet/in.h>
+#include <netinet/ip_var.h> /* struct ipfw_rule_ref */
#include <netinet/ip_fw.h>
#include <netinet/ipfw/ip_fw_private.h>
OpenPOWER on IntegriCloud