diff options
author | csjp <csjp@FreeBSD.org> | 2005-08-18 22:30:52 +0000 |
---|---|---|
committer | csjp <csjp@FreeBSD.org> | 2005-08-18 22:30:52 +0000 |
commit | 6de3f7601614eedec86747d2165c22261d0eb13d (patch) | |
tree | 052a26aad7f7fa156fdf8177e23af5935ff7519f | |
parent | cf4f3e357511611027fdf884b61a81c71608775f (diff) | |
download | FreeBSD-src-6de3f7601614eedec86747d2165c22261d0eb13d.zip FreeBSD-src-6de3f7601614eedec86747d2165c22261d0eb13d.tar.gz |
Add missing braces around bpf_filter which were missed when I
merged the bpfstat code.
Pointed out by: iedowse
Pointy hat to: csjp
MFC after: 3 days
-rw-r--r-- | sys/net/bpf.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/net/bpf.c b/sys/net/bpf.c index 9ae3a96..cfeb1d2 100644 --- a/sys/net/bpf.c +++ b/sys/net/bpf.c @@ -1256,13 +1256,14 @@ bpf_mtap(bp, m) BPFD_LOCK(d); ++d->bd_rcount; slen = bpf_filter(d->bd_filter, (u_char *)m, pktlen, 0); - if (slen != 0) + if (slen != 0) { d->bd_fcount++; #ifdef MAC if (mac_check_bpfdesc_receive(d, bp->bif_ifp) == 0) #endif catchpacket(d, (u_char *)m, pktlen, slen, bpf_mcopy); + } BPFD_UNLOCK(d); } BPFIF_UNLOCK(bp); @@ -1308,13 +1309,14 @@ bpf_mtap2(bp, data, dlen, m) BPFD_LOCK(d); ++d->bd_rcount; slen = bpf_filter(d->bd_filter, (u_char *)&mb, pktlen, 0); - if (slen != 0) + if (slen != 0) { d->bd_fcount++; #ifdef MAC if (mac_check_bpfdesc_receive(d, bp->bif_ifp) == 0) #endif catchpacket(d, (u_char *)&mb, pktlen, slen, bpf_mcopy); + } BPFD_UNLOCK(d); } BPFIF_UNLOCK(bp); |