diff mbox series

[ovs-dev] conntrack: Fix conntrack tw expiration

Message ID 1610005201-1656-1-git-send-email-lirongqing@baidu.com
State Superseded
Headers show
Series [ovs-dev] conntrack: Fix conntrack tw expiration | expand

Commit Message

Li RongQing Jan. 7, 2021, 7:40 a.m. UTC
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@baidu.com>
---
 lib/conntrack-tcp.c | 1 +
 1 file changed, 1 insertion(+)
diff mbox series

Patch

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);