From 0dea849ae93133a4a02f0d5fd58340d3df92668b Mon Sep 17 00:00:00 2001 From: John Baldwin 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/netgraph/ng_sppp.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'sys/netgraph') diff --git a/sys/netgraph/ng_sppp.c b/sys/netgraph/ng_sppp.c index efe5c91fb967..988de2e82f0e 100644 --- a/sys/netgraph/ng_sppp.c +++ b/sys/netgraph/ng_sppp.c @@ -219,8 +219,7 @@ ng_sppp_start (struct ifnet *ifp) ifp->if_drv_flags |= IFF_DRV_OACTIVE; while ((m = sppp_dequeue (ifp)) != NULL) { - if (ifp->if_bpf) - BPF_MTAP (ifp, m); + BPF_MTAP (ifp, m); len = m->m_pkthdr.len; NG_SEND_DATA_ONLY (error, priv->hook, m); @@ -382,8 +381,7 @@ ng_sppp_rcvdata (hook_p hook, item_p item) m->m_pkthdr.rcvif = SP2IFP(pp); /* Berkeley packet filter */ - if (SP2IFP(pp)->if_bpf) - BPF_MTAP (SP2IFP(pp), m); + BPF_MTAP (SP2IFP(pp), m); /* Send packet */ sppp_input (SP2IFP(pp), m); -- cgit v1.3