summaryrefslogtreecommitdiff
path: root/sys/net
diff options
context:
space:
mode:
authorDavid Gwynne <dlg@cvs.openbsd.org>2020-05-13 00:48:07 +0000
committerDavid Gwynne <dlg@cvs.openbsd.org>2020-05-13 00:48:07 +0000
commit9e52a2c89ae7851f36a4a907633b48ce39ffc8f2 (patch)
treef31379442628526b5372e62ee8486311ab777c91 /sys/net
parent5696b46f5b2422c9e7bca2fa9db041a97382935d (diff)
only pass the IO_NDELAY flag to ifq_deq_sleep as the nbio argument.
Diffstat (limited to 'sys/net')
-rw-r--r--sys/net/if_tun.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/net/if_tun.c b/sys/net/if_tun.c
index 87fae9b9c92..084b0656d9d 100644
--- a/sys/net/if_tun.c
+++ b/sys/net/if_tun.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_tun.c,v 1.221 2020/04/12 11:56:52 mpi Exp $ */
+/* $OpenBSD: if_tun.c,v 1.222 2020/05/13 00:48:06 dlg Exp $ */
/* $NetBSD: if_tun.c,v 1.24 1996/05/07 02:40:48 thorpej Exp $ */
/*
@@ -775,8 +775,8 @@ tun_dev_read(dev_t dev, struct uio *uio, int ioflag)
ifp = &sc->sc_if;
- error = ifq_deq_sleep(&ifp->if_snd, &m0, ioflag, (PZERO + 1)|PCATCH,
- "tunread", &sc->sc_reading, &sc->sc_dev);
+ error = ifq_deq_sleep(&ifp->if_snd, &m0, ISSET(ioflag, IO_NDELAY),
+ (PZERO + 1)|PCATCH, "tunread", &sc->sc_reading, &sc->sc_dev);
if (error != 0)
goto put;