Skip to content

Commit 2f28059

Browse files
nimartycfriedt
authored andcommitted
net: tcp: accept [FIN, PSH, ACK] in TCP_FIN_WAIT_2 state
TCP state machine gets stuck in TCP_FIN_WAIT_2 state when server responds with [ FIN, PSH, ACK ] Fixes #37842 Signed-off-by: Nicolas Marty <[email protected]>
1 parent a8b7caa commit 2f28059

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

subsys/net/ip/tcp2.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -1925,7 +1925,8 @@ static void tcp_in(struct tcp *conn, struct net_pkt *pkt)
19251925
break;
19261926
case TCP_FIN_WAIT_2:
19271927
if (th && (FL(&fl, ==, FIN, th_seq(th) == conn->ack) ||
1928-
FL(&fl, ==, FIN | ACK, th_seq(th) == conn->ack))) {
1928+
FL(&fl, ==, FIN | ACK, th_seq(th) == conn->ack) ||
1929+
FL(&fl, ==, FIN | PSH | ACK, th_seq(th) == conn->ack))) {
19291930
/* Received FIN on FIN_WAIT_2, so cancel the timer */
19301931
k_work_cancel_delayable(&conn->fin_timer);
19311932

0 commit comments

Comments
 (0)