Commit 7f3abab9 authored by Nicolas Marty's avatar Nicolas Marty Committed by Anas Nashif
Browse files

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: default avatarNicolas Marty <nicolas.marty@zuehlke.com>
parent 533dcaf3
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -1913,7 +1913,8 @@ next_state:
		break;
	case TCP_FIN_WAIT_2:
		if (th && (FL(&fl, ==, FIN, th_seq(th) == conn->ack) ||
			   FL(&fl, ==, FIN | ACK, th_seq(th) == conn->ack))) {
			   FL(&fl, ==, FIN | ACK, th_seq(th) == conn->ack) ||
			   FL(&fl, ==, FIN | PSH | ACK, th_seq(th) == conn->ack))) {
			/* Received FIN on FIN_WAIT_2, so cancel the timer */
			k_work_cancel_delayable(&conn->fin_timer);