diff options
Diffstat (limited to 'sys')
-rw-r--r-- | sys/net/bpf.c | 11 |
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); |