Index: if_tun.c =================================================================== RCS file: /cvs/src/sys/net/if_tun.c,v retrieving revision 1.230 diff -u -p -r1.230 if_tun.c --- if_tun.c 20 Feb 2021 04:39:16 -0000 1.230 +++ if_tun.c 5 Mar 2021 22:21:54 -0000 @@ -831,6 +814,7 @@ tun_dev_write(dev_t dev, struct uio *uio struct mbuf *m0; int error = 0; size_t mlen; + struct mbuf_list ml = MBUF_LIST_INITIALIZER(); sc = tun_get(dev); if (sc == NULL) @@ -868,9 +852,8 @@ tun_dev_write(dev_t dev, struct uio *uio if (error != 0) goto drop; - NET_LOCK(); - if_vinput(ifp, m0); - NET_UNLOCK(); + ml_enqueue(&ml, m0); + if_input(ifp, &ml); tun_put(sc); return (0);