From ea1e4fd0d7233521ab7308a3700e9f8349c2d73d Mon Sep 17 00:00:00 2001 From: Jukka Rissanen Date: Thu, 28 Feb 2019 19:29:10 +0200 Subject: [PATCH] net: tcp: Check TCP ACK flag properly during conn establishment Multiple flag bits were set so the ACK flag set was not checked properly which meant that connection establishment was not successfull. Fixes #13943 Signed-off-by: Jukka Rissanen --- subsys/net/ip/tcp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subsys/net/ip/tcp.c b/subsys/net/ip/tcp.c index 00d4f762d2cc..4f26ff40cdca 100644 --- a/subsys/net/ip/tcp.c +++ b/subsys/net/ip/tcp.c @@ -2338,7 +2338,7 @@ NET_CONN_CB(tcp_syn_rcvd) /* * If we receive ACK, we go to ESTABLISHED state. */ - if (NET_TCP_FLAGS(tcp_hdr) == NET_TCP_ACK) { + if (NET_TCP_FLAGS(tcp_hdr) & NET_TCP_ACK) { struct net_context *new_context; socklen_t addrlen; int ret;