summaryrefslogtreecommitdiff
path: root/sys/net
diff options
context:
space:
mode:
Diffstat (limited to 'sys/net')
-rw-r--r--sys/net/bpf.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/net/bpf.c b/sys/net/bpf.c
index a3e4f17c32a..f64776a88f6 100644
--- a/sys/net/bpf.c
+++ b/sys/net/bpf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bpf.c,v 1.10 1997/08/31 20:42:29 deraadt Exp $ */
+/* $OpenBSD: bpf.c,v 1.11 1997/09/05 20:17:30 deraadt Exp $ */
/* $NetBSD: bpf.c,v 1.33 1997/02/21 23:59:35 thorpej Exp $ */
/*
@@ -439,6 +439,9 @@ bpfread(dev, uio, ioflag)
int error;
int s;
+ if (d->bd_bif == 0)
+ return (ENXIO);
+
/*
* Restrict application to use a buffer the same size as
* as kernel buffers.