diff options
author | 2020-05-13 00:48:06 +0000 | |
---|---|---|
committer | 2020-05-13 00:48:06 +0000 | |
commit | ec906fa82c019f60f64bdd43bd1ac3b81eb47106 (patch) | |
tree | 30530be5b2ee86753183f19e9bfcc76703c36848 | |
parent | add some missing functions to NAME; (diff) | |
download | wireguard-openbsd-ec906fa82c019f60f64bdd43bd1ac3b81eb47106.tar.xz wireguard-openbsd-ec906fa82c019f60f64bdd43bd1ac3b81eb47106.zip |
only pass the IO_NDELAY flag to ifq_deq_sleep as the nbio argument.
-rw-r--r-- | sys/net/if_tun.c | 6 |
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; |