加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0036-stack-fix-possible-coredump-when-arp-packet-broadcas.patch 1018 Bytes
一键复制 编辑 原始数据 按行查看 历史
From 8e5dd5204c57e4443cb79cb01cdc8c16665e6734 Mon Sep 17 00:00:00 2001
From: yinbin <yinbin8@huawei.com>
Date: Fri, 10 Nov 2023 18:07:14 +0800
Subject: [PATCH] stack: fix possible coredump when arp packet broadcast in rtc
mode
---
src/lstack/core/lstack_protocol_stack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/lstack/core/lstack_protocol_stack.c b/src/lstack/core/lstack_protocol_stack.c
index 3662948..bafb569 100644
--- a/src/lstack/core/lstack_protocol_stack.c
+++ b/src/lstack/core/lstack_protocol_stack.c
@@ -852,9 +852,9 @@ void stack_broadcast_arp(struct rte_mbuf *mbuf, struct protocol_stack *cur_stack
return;
}
}
- ret = dpdk_alloc_pktmbuf(stack->rxtx_pktmbuf_pool, &mbuf_copy, 1);
+ ret = dpdk_alloc_pktmbuf(cur_stack->rxtx_pktmbuf_pool, &mbuf_copy, 1);
if (ret != 0) {
- stack->stats.rx_allocmbuf_fail++;
+ cur_stack->stats.rx_allocmbuf_fail++;
return;
}
copy_mbuf(mbuf_copy, mbuf);
--
2.23.0
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化