summaryrefslogtreecommitdiffstats
path: root/sys/net/bpf.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/net/bpf.c')
-rw-r--r--sys/net/bpf.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/sys/net/bpf.c b/sys/net/bpf.c
index 0c37a7a..5b6dd2f 100644
--- a/sys/net/bpf.c
+++ b/sys/net/bpf.c
@@ -37,7 +37,7 @@
*
* @(#)bpf.c 8.2 (Berkeley) 3/28/94
*
- * $Id: bpf.c,v 1.47 1999/01/27 22:42:13 dillon Exp $
+ * $Id: bpf.c,v 1.48 1999/04/28 01:18:13 msmith Exp $
*/
#include "bpfilter.h"
@@ -346,6 +346,9 @@ bpfopen(dev, flags, fmt, p)
{
register struct bpf_d *d;
+ if (p->p_prison)
+ return (EPERM);
+
if (minor(dev) >= NBPFILTER)
return (ENXIO);
/*
@@ -1014,12 +1017,12 @@ bpfpoll(dev, events, p)
d = &bpf_dtab[minor(dev)];
s = splimp();
- if (events & (POLLIN | POLLRDNORM))
+ if (events & (POLLIN | POLLRDNORM)) {
if (d->bd_hlen != 0 || (d->bd_immediate && d->bd_slen != 0))
revents |= events & (POLLIN | POLLRDNORM);
else
selrecord(p, &d->bd_sel);
-
+ }
splx(s);
return (revents);
}
OpenPOWER on IntegriCloud