summaryrefslogtreecommitdiffstats
path: root/sys/net/bpf.c
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2002-09-21 00:59:56 +0000
committerrwatson <rwatson@FreeBSD.org>2002-09-21 00:59:56 +0000
commitfb1a9a69958da45404a3596741ae5c78ba503d78 (patch)
treee89bd0253478ce6b1be86d40823459368d7a2f94 /sys/net/bpf.c
parentb1352d9ad47bf6b13c942fab9954a08164bb3b0e (diff)
downloadFreeBSD-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/net/bpf.c')
-rw-r--r--sys/net/bpf.c6
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);
OpenPOWER on IntegriCloud