13 Star 5 Fork 32

src-openEuler/gazelle

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0079-Fixed-an-issue-where-no-packet-is-sent-or-received-w.patch 1.43 KB
一键复制 编辑 原始数据 按行查看 历史
yinbin6 提交于 2023-12-09 23:07 . sync upstream patch
From b8f23521a5454ba0b7b1d262dfad8aa59eb328ed Mon Sep 17 00:00:00 2001
From: wuchangye <wuchangye@huawei.com>
Date: Fri, 8 Dec 2023 09:43:43 +0800
Subject: [PATCH] Fixed an issue where no packet is sent or received when UDP
traffic is sent
---
src/lstack/core/lstack_lwip.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/lstack/core/lstack_lwip.c b/src/lstack/core/lstack_lwip.c
index 026c870..c4b1ebc 100644
--- a/src/lstack/core/lstack_lwip.c
+++ b/src/lstack/core/lstack_lwip.c
@@ -443,6 +443,7 @@ static inline ssize_t app_buff_write(struct lwip_sock *sock, void *buf, size_t l
for (int i = 0; i < write_num; i++) {
pbufs[i]->addr.u_addr.ip4.addr = saddr->sin_addr.s_addr;
pbufs[i]->port = lwip_ntohs((saddr)->sin_port);
+ IP_SET_TYPE(&pbufs[i]->addr, IPADDR_TYPE_V4);
}
} else if (addr->sa_family == AF_INET6) {
struct sockaddr_in6 *saddr = (struct sockaddr_in6 *)addr;
@@ -450,6 +451,7 @@ static inline ssize_t app_buff_write(struct lwip_sock *sock, void *buf, size_t l
memcpy_s(pbufs[i]->addr.u_addr.ip6.addr, sizeof(pbufs[i]->addr.u_addr.ip6.addr),
saddr->sin6_addr.s6_addr, sizeof(saddr->sin6_addr.s6_addr));
pbufs[i]->port = lwip_ntohs((saddr)->sin6_port);
+ IP_SET_TYPE(&pbufs[i]->addr, IPADDR_TYPE_V6);
}
} else {
return 0;
--
2.27.0
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/src-openeuler/gazelle.git
git@gitee.com:src-openeuler/gazelle.git
src-openeuler
gazelle
gazelle
master

搜索帮助