Skip to content

Commit

Permalink
net: tcp: Check TCP ACK flag properly during conn establishment
Browse files Browse the repository at this point in the history
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 <jukka.rissanen@linux.intel.com>
  • Loading branch information
jukkar authored and nashif committed Mar 1, 2019
1 parent c1f24ab commit ea1e4fd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion subsys/net/ip/tcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit ea1e4fd

Please sign in to comment.