diff options
author | jhb <jhb@FreeBSD.org> | 2006-12-29 13:59:50 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2006-12-29 13:59:50 +0000 |
commit | 67155fb0b2a1b3d5ee6f59198ae389f826754c66 (patch) | |
tree | 5677cbe8565b075c609dc8ea0a6087d8251a7bca /sys/dev/firewire | |
parent | 89e0ae76db000800f893d800de9dcbf15519ff50 (diff) | |
download | FreeBSD-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/dev/firewire')
-rw-r--r-- | sys/dev/firewire/if_fwip.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/firewire/if_fwip.c b/sys/dev/firewire/if_fwip.c index 0d7e5fe..c9587f0 100644 --- a/sys/dev/firewire/if_fwip.c +++ b/sys/dev/firewire/if_fwip.c @@ -838,7 +838,7 @@ fwip_stream_input(struct fw_xferq *xferq) * Record the sender ID for possible BPF usage. */ src = ntohl(p[1]) >> 16; - if (ifp->if_bpf) { + if (bpf_peers_present(ifp->if_bpf)) { mtag = m_tag_alloc(MTAG_FIREWIRE, MTAG_FIREWIRE_SENDER_EUID, 2*sizeof(uint32_t), M_NOWAIT); @@ -939,7 +939,7 @@ fwip_unicast_input(struct fw_xfer *xfer) return; } - if (ifp->if_bpf) { + if (bpf_peers_present(ifp->if_bpf)) { /* * Record the sender ID for possible BPF usage. */ |