From 67155fb0b2a1b3d5ee6f59198ae389f826754c66 Mon Sep 17 00:00:00 2001 From: jhb Date: Fri, 29 Dec 2006 13:59:50 +0000 Subject: Various bpf(4) related fixes to catch places up to the new bpf(4) semantics. - Stop testing bpf pointers for NULL. In some cases use bpf_peers_present() and then call the function directly inside the conditional block instead of the macro. - For places where the entire conditional block is the macro, remove the test and make the macro unconditional. - Use BPF_MTAP() in if_pfsync on FreeBSD instead of an expanded version of the old semantics. Reviewed by: csjp (older version) --- sys/contrib/pf/net/if_pfsync.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'sys/contrib/pf') diff --git a/sys/contrib/pf/net/if_pfsync.c b/sys/contrib/pf/net/if_pfsync.c index bec33e4..24687de 100644 --- a/sys/contrib/pf/net/if_pfsync.c +++ b/sys/contrib/pf/net/if_pfsync.c @@ -1793,9 +1793,13 @@ pfsync_sendout(sc) KASSERT(m != NULL, ("pfsync_sendout: null mbuf")); #endif #if NBPFILTER > 0 +#ifdef __FreeBSD__ + BPF_MTAP(ifp, m); +#else if (ifp->if_bpf) bpf_mtap(ifp->if_bpf, m); #endif +#endif if (sc->sc_mbuf_net) { m_freem(m); -- cgit v1.1