summaryrefslogtreecommitdiffstats
path: root/sys/i4b
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/i4b
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/i4b')
-rw-r--r--sys/i4b/driver/i4b_ipr.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/i4b/driver/i4b_ipr.c b/sys/i4b/driver/i4b_ipr.c
index 537ef3d..c90e484 100644
--- a/sys/i4b/driver/i4b_ipr.c
+++ b/sys/i4b/driver/i4b_ipr.c
@@ -883,7 +883,7 @@ error:
}
#endif
- if(sc->sc_ifp->if_bpf)
+ if(bpf_peers_present(sc->sc_ifp->if_bpf))
{
/* prepend the address family as a four byte field */
struct mbuf mm;
@@ -891,7 +891,7 @@ error:
mm.m_next = m;
mm.m_len = 4;
mm.m_data = (char *)&af;
- BPF_MTAP(sc->sc_ifp, &mm);
+ bpf_mtap(sc->sc_ifp, &mm);
}
if(netisr_queue(NETISR_IP, m)) /* (0) on success. */
@@ -936,7 +936,7 @@ ipr_tx_queue_empty(int unit)
microtime(&sc->sc_ifp->if_lastchange);
- if(sc->sc_ifp->if_bpf)
+ if(bpf_peers_present(sc->sc_ifp->if_bpf))
{
/* prepend the address family as a four byte field */
@@ -945,7 +945,7 @@ ipr_tx_queue_empty(int unit)
mm.m_next = m;
mm.m_len = 4;
mm.m_data = (char *)&af;
- BPF_MTAP(sc->sc_ifp, &mm);
+ bpf_mtap(sc->sc_ifp, &mm);
}
#if I4BIPRACCT
OpenPOWER on IntegriCloud