代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/gazelle 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From d609d7a16c0ab0e0215e7c84909bc19b8216727f Mon Sep 17 00:00:00 2001
From: compile_success <980965867@qq.com>
Date: Wed, 21 Sep 2022 12:06:21 +0000
Subject: [PATCH 08/21] ltran update list
---
src/ltran/ltran_forward.c | 19 +++++++++++++------
1 file changed, 13 insertions(+), 6 deletions(-)
diff --git a/src/ltran/ltran_forward.c b/src/ltran/ltran_forward.c
index 1a92348..9ca04aa 100644
--- a/src/ltran/ltran_forward.c
+++ b/src/ltran/ltran_forward.c
@@ -432,18 +432,25 @@ static __rte_always_inline void tcp_hash_table_add_conn(struct gazelle_stack *st
struct gazelle_quintuple *transfer_qtuple, uint32_t tid)
{
struct gazelle_tcp_conn *tcp_conn = NULL;
+ struct gazelle_tcp_conn_htable *conn_htable = gazelle_get_tcp_conn_htable();
- /* When lstack is the server, conn is created in tcp_handle func. lwip send the connect command after
- receiving syn, and delete conn timeout. */
- tcp_conn = gazelle_conn_get_by_quintuple(gazelle_get_tcp_conn_htable(), transfer_qtuple);
+ tcp_conn = gazelle_conn_get_by_quintuple(conn_htable, transfer_qtuple);
if (tcp_conn) {
- tcp_conn->conn_timeout = -1;
- return;
+ /* When lstack is the server, conn is created in tcp_handle func. lwip send the connect command after
+ * receiving syn, and delete conn timeout. */
+ if (tcp_conn->conn_timeout >= 0) {
+ tcp_conn->conn_timeout = -1;
+ return;
+ } else {
+ /* del old invaild conn */
+ gazelle_conn_del_by_quintuple(conn_htable, transfer_qtuple);
+ printf("del old conn port=%d\n", ntohs(transfer_qtuple->dst_port));
+ }
}
/* When lstack is the client, lwip send the connect command while calling connect func. conn is created
without a timeout */
- tcp_conn = gazelle_conn_add_by_quintuple(gazelle_get_tcp_conn_htable(), transfer_qtuple);
+ tcp_conn = gazelle_conn_add_by_quintuple(conn_htable, transfer_qtuple);
if (tcp_conn == NULL) {
LTRAN_ERR("add tcp conn htable failed\n");
return;
--
2.23.0
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。