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

