aboutsummaryrefslogtreecommitdiff
path: root/sys/netinet/tcp_reass.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/netinet/tcp_reass.c')
-rw-r--r--sys/netinet/tcp_reass.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/sys/netinet/tcp_reass.c b/sys/netinet/tcp_reass.c
index 1284689184f0..63d1c1cdd952 100644
--- a/sys/netinet/tcp_reass.c
+++ b/sys/netinet/tcp_reass.c
@@ -1963,9 +1963,9 @@ process_ACK:
case TCPS_CLOSING:
if (ourfinisacked) {
KASSERT(headlocked, ("headlocked"));
+ tcp_twstart(tp);
INP_INFO_WUNLOCK(&tcbinfo);
m_freem(m);
- tcp_twstart(tp);
return;
}
break;
@@ -2078,8 +2078,10 @@ step6:
}
dodata: /* XXX */
KASSERT(headlocked, ("headlocked"));
- INP_INFO_WUNLOCK(&tcbinfo);
- headlocked = 0;
+ if (!(thflags & TH_FIN && tp->t_state == TCPS_FIN_WAIT_2)) {
+ INP_INFO_WUNLOCK(&tcbinfo);
+ headlocked = 0;
+ }
/*
* Process the segment text, merging it into the TCP sequencing queue,
* and arranging for acknowledgment of receipt if necessary.
@@ -2183,8 +2185,9 @@ dodata: /* XXX */
* standard timers.
*/
case TCPS_FIN_WAIT_2:
- KASSERT(headlocked == 0, ("headlocked"));
+ KASSERT(headlocked == 1, ("headlocked should be 1"));
tcp_twstart(tp);
+ INP_INFO_WUNLOCK(&tcbinfo);
return;
/*
@@ -2211,11 +2214,10 @@ dodata: /* XXX */
check_delack:
if (tp->t_flags & TF_DELACK) {
tp->t_flags &= ~TF_DELACK;
- KASSERT(!callout_active(tp->tt_delack),
- ("delayed ack already active"));
callout_reset(tp->tt_delack, tcp_delacktime,
tcp_timer_delack, tp);
}
+ KASSERT(headlocked == 0, ("headlocked should be 0"));
INP_UNLOCK(inp);
return;