From 1384b62c4ba2ec9807b625311f416059f3a7aac0 Mon Sep 17 00:00:00 2001 From: luigi Date: Fri, 5 Jun 2009 13:44:30 +0000 Subject: 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 --- sys/netinet/ip_fw_pfil.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'sys/netinet/ip_fw_pfil.c') 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); -- cgit v1.1