1 Star 0 Fork 32

吴昌盛/gazelle-tar

forked from src-openEuler/gazelle 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0212-fix-kernel-scoket-select-path-error.patch 961 Bytes
一键复制 编辑 原始数据 按行查看 历史
jinag12 提交于 2023-03-21 11:00 . sync fix parse args error
From 551fbc433a51eb34dd353236391f6d844866f67c Mon Sep 17 00:00:00 2001
From: jiangheng12 <jiangheng14@huawei.com>
Date: Sat, 18 Mar 2023 19:36:38 +0800
Subject: [PATCH] fix kernel scoket select path error
---
src/lstack/api/lstack_wrap.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/lstack/api/lstack_wrap.c b/src/lstack/api/lstack_wrap.c
index 9a021d7..e1b82fc 100644
--- a/src/lstack/api/lstack_wrap.c
+++ b/src/lstack/api/lstack_wrap.c
@@ -88,7 +88,9 @@ static enum KERNEL_LWIP_PATH select_path(int fd)
}
struct tcp_pcb *pcb = sock->conn->pcb.tcp;
- if (pcb != NULL && pcb->state <= ESTABLISHED) {
+ /* after lwip connect, call send immediately, pcb->state is SYN_SENT, need return PATH_LWIP */
+ /* pcb->state default value is CLOSED when call socket, need return PATH_UNKNOW */
+ if (pcb != NULL && pcb->state <= ESTABLISHED && pcb->state >= LISTEN) {
return PATH_LWIP;
}
--
2.23.0
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/wu-changsheng/gazelle-tar.git
git@gitee.com:wu-changsheng/gazelle-tar.git
wu-changsheng
gazelle-tar
gazelle-tar
master

搜索帮助