summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormpi <mpi@openbsd.org>2015-05-19 15:10:59 +0000
committermpi <mpi@openbsd.org>2015-05-19 15:10:59 +0000
commitfbad357673bd92b4fd4a9eef47ba599e2f056704 (patch)
tree4f8b1f2f06a2205783960c3c389a40ee8764c09b
parentDo not leak a rtentry if it is unusable. (diff)
downloadwireguard-openbsd-fbad357673bd92b4fd4a9eef47ba599e2f056704.tar.xz
wireguard-openbsd-fbad357673bd92b4fd4a9eef47ba599e2f056704.zip
splx should also be called in the error case, fix a regression
introduced during the if_output() conversion. Found by jsg@
-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 28a14b279ac..06a747b6f38 100644
--- a/sys/net/if_tun.c
+++ b/sys/net/if_tun.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_tun.c,v 1.141 2015/05/15 12:40:05 mpi Exp $ */
+/* $OpenBSD: if_tun.c,v 1.142 2015/05/19 15:10:59 mpi Exp $ */
/* $NetBSD: if_tun.c,v 1.24 1996/05/07 02:40:48 thorpej Exp $ */
/*
@@ -570,13 +570,13 @@ tun_output(struct ifnet *ifp, struct mbuf *m0, struct sockaddr *dst,
#endif
error = if_output(ifp, m0);
+ splx(s);
+
if (error) {
ifp->if_collisions++;
return (error);
}
- splx(s);
-
tun_wakeup(tp);
return (0);
}