1 Star 0 Fork 48

hantwofish/lwip

forked from src-openEuler/lwip 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0107-fix-move-lpcb-to-the-front-of-list-error.patch 853 Bytes
一键复制 编辑 原始数据 按行查看 历史
jinag12 提交于 2024-01-30 15:41 . fix move lpcb to the front of list error
From e2754cc316ca1fadabfbd8c927275a0d0d50d867 Mon Sep 17 00:00:00 2001
From: jiangheng <jiangheng14@huawei.com>
Date: Tue, 30 Jan 2024 15:38:13 +0800
Subject: [PATCH] fix move lpcb to the front of list error
---
src/core/tcp_in.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/core/tcp_in.c b/src/core/tcp_in.c
index ec1905f..9d5a695 100644
--- a/src/core/tcp_in.c
+++ b/src/core/tcp_in.c
@@ -454,6 +454,10 @@ tcp_input(struct pbuf *p, struct netif *inp)
/* our successor is the remainder of the listening list */
lpcb->next = tcp_listen_pcbs.listen_pcbs;
#if GAZELLE_ENABLE
+ /* prev is head */
+ if (prev->prev == NULL) {
+ prev->prev = (struct tcp_pcb *)lpcb;
+ }
lpcb->prev = NULL;
#endif
/* put this listening pcb at the head of the listening list */
--
2.33.0
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/hantwofish/lwip.git
git@gitee.com:hantwofish/lwip.git
hantwofish
lwip
lwip
master

搜索帮助