diff options
author | rwatson <rwatson@FreeBSD.org> | 2002-09-21 00:59:56 +0000 |
---|---|---|
committer | rwatson <rwatson@FreeBSD.org> | 2002-09-21 00:59:56 +0000 |
commit | fb1a9a69958da45404a3596741ae5c78ba503d78 (patch) | |
tree | e89bd0253478ce6b1be86d40823459368d7a2f94 /sys | |
parent | b1352d9ad47bf6b13c942fab9954a08164bb3b0e (diff) | |
download | FreeBSD-src-fb1a9a69958da45404a3596741ae5c78ba503d78.zip FreeBSD-src-fb1a9a69958da45404a3596741ae5c78ba503d78.tar.gz |
Insert a missing call to MAC protection check for delivering an
mbuf to a bpf device.
Obtained from: TrustedBSD Project
Sponsored by: DARPA, Network Associates Laboratories
Submitted by: phk
Diffstat (limited to 'sys')
-rw-r--r-- | sys/net/bpf.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/net/bpf.c b/sys/net/bpf.c index f1943a4..eeee0a3 100644 --- a/sys/net/bpf.c +++ b/sys/net/bpf.c @@ -1136,7 +1136,11 @@ bpf_mtap(ifp, m) ++d->bd_rcount; slen = bpf_filter(d->bd_filter, (u_char *)m, pktlen, 0); if (slen != 0) - catchpacket(d, (u_char *)m, pktlen, slen, bpf_mcopy); +#ifdef MAC + if (mac_check_bpfdesc_receive(d, ifp) == 0) +#endif + catchpacket(d, (u_char *)m, pktlen, slen, + bpf_mcopy); BPFD_UNLOCK(d); } BPFIF_UNLOCK(bp); |