diff options
author | luigi <luigi@FreeBSD.org> | 2009-06-05 13:44:30 +0000 |
---|---|---|
committer | luigi <luigi@FreeBSD.org> | 2009-06-05 13:44:30 +0000 |
commit | 1384b62c4ba2ec9807b625311f416059f3a7aac0 (patch) | |
tree | c69eecd8f875c47b7a4ba27f5a37ac99ee98e78f /sys/net/if_ethersubr.c | |
parent | 2e85daee53850ca1d9c8acfa556ce08d31c9515a (diff) | |
download | FreeBSD-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/net/if_ethersubr.c')
-rw-r--r-- | sys/net/if_ethersubr.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/net/if_ethersubr.c b/sys/net/if_ethersubr.c index 44f6b23..19122d6 100644 --- a/sys/net/if_ethersubr.c +++ b/sys/net/if_ethersubr.c @@ -432,7 +432,7 @@ ether_output_frame(struct ifnet *ifp, struct mbuf *m) INIT_VNET_NET(ifp->if_vnet); struct ip_fw *rule = ip_dn_claim_rule(m); - if (IPFW_LOADED && V_ether_ipfw != 0) { + if (ip_fw_chk_ptr && V_ether_ipfw != 0) { if (ether_ipfw_chk(&m, ifp, &rule, 0) == 0) { if (m) { m_freem(m); @@ -520,7 +520,7 @@ ether_ipfw_chk(struct mbuf **m0, struct ifnet *dst, if (i == IP_FW_PASS) /* a PASS rule. */ return 1; - if (DUMMYNET_LOADED && (i == IP_FW_DUMMYNET)) { + if (ip_dn_io_ptr && (i == IP_FW_DUMMYNET)) { /* * Pass the pkt to dummynet, which consumes it. * If shared, make a copy and keep the original. @@ -766,7 +766,7 @@ ether_demux(struct ifnet *ifp, struct mbuf *m) * Allow dummynet and/or ipfw to claim the frame. * Do not do this for PROMISC frames in case we are re-entered. */ - if (IPFW_LOADED && V_ether_ipfw != 0 && !(m->m_flags & M_PROMISC)) { + if (ip_fw_chk_ptr && V_ether_ipfw != 0 && !(m->m_flags & M_PROMISC)) { struct ip_fw *rule = ip_dn_claim_rule(m); if (ether_ipfw_chk(&m, NULL, &rule, 0) == 0) { |