From c8f0963c9e61ccb376847f9be4be743370b21162 Mon Sep 17 00:00:00 2001 From: csjp Date: Thu, 2 Feb 2006 16:41:20 +0000 Subject: Use PFIL_HOOKED macros in if_bridge and pass the right argument to rw_assert. This un-breaks the build. Submitted by: Kostik Belousov Pointy hat to: csjp --- sys/net/if_bridge.c | 20 ++++++++++---------- sys/netinet/ip_fw2.c | 2 +- 2 files changed, 11 insertions(+), 11 deletions(-) (limited to 'sys') diff --git a/sys/net/if_bridge.c b/sys/net/if_bridge.c index 1ec9e62..6be9ab6 100644 --- a/sys/net/if_bridge.c +++ b/sys/net/if_bridge.c @@ -1531,9 +1531,9 @@ bridge_dummynet(struct mbuf *m, struct ifnet *ifp) return; } - if (inet_pfil_hook.ph_busy_count >= 0 + if (PFIL_HOOKED(&inet_pfil_hook) #ifdef INET6 - || inet6_pfil_hook.ph_busy_count >= 0 + || PFIL_HOOKED(&inet6_pfil_hook) #endif ) { if (bridge_pfil(&m, sc->sc_ifp, ifp, PFIL_OUT) != 0) @@ -1800,9 +1800,9 @@ bridge_forward(struct bridge_softc *sc, struct mbuf *m) } /* run the packet filter */ - if (inet_pfil_hook.ph_busy_count >= 0 + if (PFIL_HOOKED(&inet_pfil_hook) #ifdef INET6 - || inet6_pfil_hook.ph_busy_count >= 0 + || PFIL_HOOKED(&inet6_pfil_hook) #endif ) { BRIDGE_UNLOCK(sc); @@ -1857,9 +1857,9 @@ bridge_forward(struct bridge_softc *sc, struct mbuf *m) BRIDGE_UNLOCK(sc); - if (inet_pfil_hook.ph_busy_count >= 0 + if (PFIL_HOOKED(&inet_pfil_hook) #ifdef INET6 - || inet6_pfil_hook.ph_busy_count >= 0 + || PFIL_HOOKED(&inet6_pfil_hook) #endif ) { if (bridge_pfil(&m, sc->sc_ifp, dst_if, PFIL_OUT) != 0) @@ -2055,9 +2055,9 @@ bridge_broadcast(struct bridge_softc *sc, struct ifnet *src_if, } /* Filter on the bridge interface before broadcasting */ - if (runfilt && (inet_pfil_hook.ph_busy_count >= 0 + if (runfilt && (PFIL_HOOKED(&inet_pfil_hook) #ifdef INET6 - || inet6_pfil_hook.ph_busy_count >= 0 + || PFIL_HOOKED(&inet6_pfil_hook) #endif )) { if (bridge_pfil(&m, sc->sc_ifp, NULL, PFIL_OUT) != 0) @@ -2102,9 +2102,9 @@ bridge_broadcast(struct bridge_softc *sc, struct ifnet *src_if, * pointer so we do not redundantly filter on the bridge for * each interface we broadcast on. */ - if (runfilt && (inet_pfil_hook.ph_busy_count >= 0 + if (runfilt && (PFIL_HOOKED(&inet_pfil_hook) #ifdef INET6 - || inet6_pfil_hook.ph_busy_count >= 0 + || PFIL_HOOKED(&inet6_pfil_hook) #endif )) { if (bridge_pfil(&mc, NULL, dst_if, PFIL_OUT) != 0) diff --git a/sys/netinet/ip_fw2.c b/sys/netinet/ip_fw2.c index ea43ece..f735ca9 100644 --- a/sys/netinet/ip_fw2.c +++ b/sys/netinet/ip_fw2.c @@ -139,7 +139,7 @@ struct ip_fw_chain { rw_init(&(_chain)->rwmtx, "IPFW static rules") #define IPFW_LOCK_DESTROY(_chain) rw_destroy(&(_chain)->rwmtx) #define IPFW_WLOCK_ASSERT(_chain) do { \ - rw_assert(rw, RA_WLOCKED); \ + rw_assert(&(_chain)->rwmtx, RA_WLOCKED); \ NET_ASSERT_GIANT(); \ } while (0) -- cgit v1.1