diff options
author | Yi-Hung Wei <yihung.wei@gmail.com> | 2020-02-07 14:55:06 -0800 |
---|---|---|
committer | William Tu <u9012063@gmail.com> | 2020-02-18 15:02:43 -0800 |
commit | ac23d20fc90da3b1c9b2117d1e22102e99fba006 (patch) | |
tree | a28fab2bc2d6b9fc3ea6c309bca8cad01239e850 | |
parent | 486139d9e4b81dae04b2bb7487d45366865ac0ad (diff) | |
download | openvswitch-ac23d20fc90da3b1c9b2117d1e22102e99fba006.tar.gz |
conntrack: Fix TCP conntrack state
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: a867c010ee91 ("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>
-rw-r--r-- | lib/conntrack-tcp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/conntrack-tcp.c b/lib/conntrack-tcp.c index 416cb769d..47261c755 100644 --- a/lib/conntrack-tcp.c +++ b/lib/conntrack-tcp.c @@ -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; } } |