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
This commit is contained in:
Christian S.J. Peron 2005-08-18 22:30:52 +00:00
parent c2dfd19ff0
commit 4ddfb5312a
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=149255

View File

@ -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);