summaryrefslogtreecommitdiffstats
path: root/sys/netgraph/ng_sppp.c
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2006-12-29 13:59:50 +0000
committerjhb <jhb@FreeBSD.org>2006-12-29 13:59:50 +0000
commit67155fb0b2a1b3d5ee6f59198ae389f826754c66 (patch)
tree5677cbe8565b075c609dc8ea0a6087d8251a7bca /sys/netgraph/ng_sppp.c
parent89e0ae76db000800f893d800de9dcbf15519ff50 (diff)
downloadFreeBSD-src-67155fb0b2a1b3d5ee6f59198ae389f826754c66.zip
FreeBSD-src-67155fb0b2a1b3d5ee6f59198ae389f826754c66.tar.gz
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)
Diffstat (limited to 'sys/netgraph/ng_sppp.c')
-rw-r--r--sys/netgraph/ng_sppp.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/sys/netgraph/ng_sppp.c b/sys/netgraph/ng_sppp.c
index efe5c91..988de2e 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);
OpenPOWER on IntegriCloud