[ovs-dev] [PATCH] conntrack: Fix conntrack tw expiration

Li RongQing lirongqing at baidu.com
Thu Jan 7 07:40:01 UTC 2021


In connection tracking system, a connection will enter timewait
status when one side receive a fin, then a reset packet reached

But the expiration time is not updated, still is the previous
expiration time

Signed-off-by: Li RongQing <lirongqing at baidu.com>
---
 lib/conntrack-tcp.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/conntrack-tcp.c b/lib/conntrack-tcp.c
index 18a2aa7c7..f1595af7a 100644
--- a/lib/conntrack-tcp.c
+++ b/lib/conntrack-tcp.c
@@ -406,6 +406,7 @@ tcp_conn_update(struct conntrack *ct, struct conn *conn_,
 
         if (tcp_flags & TCP_RST) {
             src->state = dst->state = CT_DPIF_TCPS_TIME_WAIT;
+            conn_update_expiration(ct, &conn->up, CT_TM_TCP_CLOSED, now);
         }
     } else {
         COVERAGE_INC(conntrack_tcp_seq_chk_failed);
-- 
2.17.3



More information about the dev mailing list