summaryrefslogtreecommitdiffstats
path: root/sys/netinet/tcp_input.c
diff options
context:
space:
mode:
authormpi <mpi@openbsd.org>2016-11-07 09:08:05 +0000
committermpi <mpi@openbsd.org>2016-11-07 09:08:05 +0000
commit70f3883837835a1a6ac2be2d7cbd4aec1cd61cfd (patch)
tree590318ab3e6b2826c6489af9e427e78f86cc26d9 /sys/netinet/tcp_input.c
parentHide FIX_SSTEP() behind #ifdef _KERNEL (diff)
downloadwireguard-openbsd-70f3883837835a1a6ac2be2d7cbd4aec1cd61cfd.tar.xz
wireguard-openbsd-70f3883837835a1a6ac2be2d7cbd4aec1cd61cfd.zip
Use goto for consistently instead of splx() and return.
This will allow to have a single lock/unlock dance per timer.
Diffstat (limited to 'sys/netinet/tcp_input.c')
-rw-r--r--sys/netinet/tcp_input.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c
index 2d06f541948..5fa4881a43f 100644
--- a/sys/netinet/tcp_input.c
+++ b/sys/netinet/tcp_input.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tcp_input.c,v 1.329 2016/10/04 13:56:50 mpi Exp $ */
+/* $OpenBSD: tcp_input.c,v 1.330 2016/11/07 09:08:05 mpi Exp $ */
/* $NetBSD: tcp_input.c,v 1.23 1996/02/13 23:43:44 christos Exp $ */
/*
@@ -3523,10 +3523,8 @@ syn_cache_timer(void *arg)
int s;
s = splsoftnet();
- if (sc->sc_flags & SCF_DEAD) {
- splx(s);
- return;
- }
+ if (sc->sc_flags & SCF_DEAD)
+ goto out;
if (__predict_false(sc->sc_rxtshift == TCP_MAXRXTSHIFT)) {
/* Drop it -- too many retransmissions. */
@@ -3549,6 +3547,7 @@ syn_cache_timer(void *arg)
sc->sc_rxtshift++;
SYN_CACHE_TIMER_ARM(sc);
+ out:
splx(s);
return;