Skip to content

Commit

Permalink
conntrack: Fix TCP conntrack state
Browse files Browse the repository at this point in the history
If a TCP connection is in SYN_SENT state, receiving another SYN packet
would just renew the timeout of that conntrack entry rather than create
a new one.  Thus, tcp_conn_update() should return CT_UPDATE_VALID_NEW.

This also fixes regressions of a couple of  OVN system tests.

Fixes: a867c01 ("conntrack: Fix conntrack new state")
Reported-by: Dumitru Ceara <dceara@redhat.com>
Signed-off-by: Yi-Hung Wei <yihung.wei@gmail.com>
Tested-by: Dumitru Ceara <dceara@redhat.com>
Signed-off-by: William Tu <u9012063@gmail.com>
  • Loading branch information
YiHungWei authored and williamtu committed Feb 18, 2020
1 parent 486139d commit ac23d20
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/conntrack-tcp.c
Expand Up @@ -189,7 +189,7 @@ tcp_conn_update(struct conntrack *ct, struct conn *conn_,
} else if (src->state <= CT_DPIF_TCPS_SYN_SENT) {
src->state = CT_DPIF_TCPS_SYN_SENT;
conn_update_expiration(ct, &conn->up, CT_TM_TCP_FIRST_PACKET, now);
return CT_UPDATE_NEW;
return CT_UPDATE_VALID_NEW;
}
}

Expand Down

0 comments on commit ac23d20

Please sign in to comment.