lwip/0159-LOOPBACK-fix-loop-coredump.patch
yinbin c6f4c0e465 LOOPBACK: fix loop coredump
(cherry picked from commit 3c9825cc509393533200148bbbde1f91ad4052cd)
2024-08-21 09:19:51 +08:00

41 lines
1.1 KiB
Diff

From a95eada1728b09edd9f2d06bb13cab9e7b0eac8e Mon Sep 17 00:00:00 2001
From: yinbin <yinbin8@huawei.com>
Date: Tue, 23 Jul 2024 16:27:58 +0800
Subject: [PATCH] LOOPBACK: fix loop coredump
---
src/core/netif.c | 2 +-
src/include/lwipopts.h | 3 +++
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/core/netif.c b/src/core/netif.c
index e6cdebe..eba9a0b 100644
--- a/src/core/netif.c
+++ b/src/core/netif.c
@@ -198,7 +198,7 @@ netif_init(void)
#define LOOPIF_ADDRINIT
#endif /* LWIP_IPV4 */
-#if NO_SYS
+#if NO_SYS || GAZELLE_ENABLE
netif_add(&loop_netif, LOOPIF_ADDRINIT NULL, netif_loopif_init, ip_input);
#else /* NO_SYS */
netif_add(&loop_netif, LOOPIF_ADDRINIT NULL, netif_loopif_init, tcpip_input);
diff --git a/src/include/lwipopts.h b/src/include/lwipopts.h
index e001657..4483ebe 100644
--- a/src/include/lwipopts.h
+++ b/src/include/lwipopts.h
@@ -288,6 +288,9 @@
#define LWIP_VLAN_PCP 1
#define VLAN_LEN 4
+#define LWIP_NETIF_LOOPBACK_MULTITHREADING 0
+
+
/*
------------------------------------
---------- multicast options ----------
--
2.34.1