summaryrefslogtreecommitdiffstats
path: root/sys/netinet/ip_fw_pfil.c
diff options
context:
space:
mode:
authorluigi <luigi@FreeBSD.org>2009-06-05 13:44:30 +0000
committerluigi <luigi@FreeBSD.org>2009-06-05 13:44:30 +0000
commit1384b62c4ba2ec9807b625311f416059f3a7aac0 (patch)
treec69eecd8f875c47b7a4ba27f5a37ac99ee98e78f /sys/netinet/ip_fw_pfil.c
parent2e85daee53850ca1d9c8acfa556ce08d31c9515a (diff)
downloadFreeBSD-src-1384b62c4ba2ec9807b625311f416059f3a7aac0.zip
FreeBSD-src-1384b62c4ba2ec9807b625311f416059f3a7aac0.tar.gz
More cleanup in preparation of ipfw relocation (no actual code change):
+ move ipfw and dummynet hooks declarations to raw_ip.c (definitions in ip_var.h) same as for most other global variables. This removes some dependencies from ip_input.c; + remove the IPFW_LOADED macro, just test ip_fw_chk_ptr directly; + remove the DUMMYNET_LOADED macro, just test ip_dn_io_ptr directly; + move ip_dn_ruledel_ptr to ip_fw2.c which is the only file using it; To be merged together with rev 193497 MFC after: 5 days
Diffstat (limited to 'sys/netinet/ip_fw_pfil.c')
-rw-r--r--sys/netinet/ip_fw_pfil.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/sys/netinet/ip_fw_pfil.c b/sys/netinet/ip_fw_pfil.c
index 3064cd9..0b1ba2d 100644
--- a/sys/netinet/ip_fw_pfil.c
+++ b/sys/netinet/ip_fw_pfil.c
@@ -77,9 +77,6 @@ int fw6_enable = 1;
int ipfw_chg_hook(SYSCTL_HANDLER_ARGS);
-/* Dummynet hooks. */
-ip_dn_ruledel_t *ip_dn_ruledel_ptr = NULL;
-
/* Divert hooks. */
ip_divert_packet_t *ip_divert_ptr = NULL;
@@ -167,7 +164,7 @@ again:
break; /* not reached */
case IP_FW_DUMMYNET:
- if (!DUMMYNET_LOADED)
+ if (ip_dn_io_ptr == NULL)
goto drop;
if (mtod(*m0, struct ip *)->ip_v == 4)
ip_dn_io_ptr(m0, DN_TO_IP_IN, &args);
@@ -302,7 +299,7 @@ again:
break; /* not reached */
case IP_FW_DUMMYNET:
- if (!DUMMYNET_LOADED)
+ if (ip_dn_io_ptr == NULL)
break;
if (mtod(*m0, struct ip *)->ip_v == 4)
ip_dn_io_ptr(m0, DN_TO_IP_OUT, &args);
OpenPOWER on IntegriCloud