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/dev/ctau/if_ct.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'sys/dev/ctau') diff --git a/sys/dev/ctau/if_ct.c b/sys/dev/ctau/if_ct.c index d46ef89..7846334 100644 --- a/sys/dev/ctau/if_ct.c +++ b/sys/dev/ctau/if_ct.c @@ -1040,8 +1040,7 @@ static void ct_send (drv_t *d) if (! m) return; #ifndef NETGRAPH - if (d->ifp->if_bpf) - BPF_MTAP (d->ifp, m); + BPF_MTAP (d->ifp, m); #endif len = m_length (m, NULL); if (! m->m_next) @@ -1161,8 +1160,7 @@ static void ct_receive (ct_chan_t *c, char *data, int len) m->m_pkthdr.rcvif = d->ifp; /* Check if there's a BPF listener on this interface. * If so, hand off the raw packet to bpf. */ - if (d->ifp->if_bpf) - BPF_TAP (d->ifp, data, len); + BPF_TAP (d->ifp, data, len); IF_ENQUEUE (&d->queue, m); #endif } -- cgit v1.1