summaryrefslogtreecommitdiffstats
path: root/sys/net
diff options
context:
space:
mode:
Diffstat (limited to 'sys/net')
-rw-r--r--sys/net/bpf.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/sys/net/bpf.c b/sys/net/bpf.c
index d2eaa39..12e375e 100644
--- a/sys/net/bpf.c
+++ b/sys/net/bpf.c
@@ -500,11 +500,12 @@ bpfread(dev, uio, ioflag)
return (ENXIO);
}
- if (ioflag & IO_NDELAY)
- error = EWOULDBLOCK;
- else
- error = BPF_SLEEP((caddr_t)d, PRINET|PCATCH, "bpf",
- d->bd_rtout);
+ if (ioflag & IO_NDELAY) {
+ splx(s);
+ return (EWOULDBLOCK);
+ }
+ error = BPF_SLEEP((caddr_t)d, PRINET|PCATCH, "bpf",
+ d->bd_rtout);
if (error == EINTR || error == ERESTART) {
splx(s);
return (error);
OpenPOWER on IntegriCloud