Commit 2f28059b authored by Nicolas Marty's avatar Nicolas Marty Committed by Christopher Friedt
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 a8b7caa5
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -1925,7 +1925,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);