net: tcp2: Check the ack number in SYN_SENT

In SYN_SENT check the ack number of the incoming TCP message
against our sequence number.

This problem was overlooked earlier and was found while
testing TCP2 client side.

Signed-off-by: Oleg Zhurakivskyy <oleg.zhurakivskyy@intel.com>
This commit is contained in:
Oleg Zhurakivskyy 2020-03-06 15:26:05 +02:00 committed by Jukka Rissanen
commit b0381bc80e

View file

@ -1043,7 +1043,7 @@ next_state:
* ACK , shouldn't we go to SYN RECEIVED state? See Figure
* 6 of RFC 793
*/
if (FL(&fl, &, ACK, th && th_seq(th) == conn->ack)) {
if (FL(&fl, &, ACK, th && th_ack(th) == conn->seq)) {
tcp_send_timer_cancel(conn);
next = TCP_ESTABLISHED;
net_context_set_state(conn->context,