From af715b67421602c3b4740f807408f9eb8affbe28 Mon Sep 17 00:00:00 2001 From: yinbin Date: Tue, 23 Jul 2024 16:32:12 +0800 Subject: [PATCH] LOOPBACK: fix loop coredump --- 0159-LOOPBACK-fix-loop-coredump.patch | 40 +++++++++++++++++++++++++++ lwip.spec | 7 ++++- 2 files changed, 46 insertions(+), 1 deletion(-) create mode 100644 0159-LOOPBACK-fix-loop-coredump.patch diff --git a/0159-LOOPBACK-fix-loop-coredump.patch b/0159-LOOPBACK-fix-loop-coredump.patch new file mode 100644 index 0000000..07b4705 --- /dev/null +++ b/0159-LOOPBACK-fix-loop-coredump.patch @@ -0,0 +1,40 @@ +From a95eada1728b09edd9f2d06bb13cab9e7b0eac8e Mon Sep 17 00:00:00 2001 +From: yinbin +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 + diff --git a/lwip.spec b/lwip.spec index d476a63..7492fae 100644 --- a/lwip.spec +++ b/lwip.spec @@ -4,7 +4,7 @@ Summary: lwip is a small independent implementation of the TCP/IP protocol suite Name: lwip Version: 2.2.0 -Release: 49 +Release: 50 License: BSD URL: http://savannah.nongnu.org/projects/lwip/ Source0: http://download.savannah.nongnu.org/releases/lwip/%{name}-%{version}.zip @@ -170,6 +170,7 @@ Patch9154: 0155-cleancode-refactor-sys_now-and-lwip_ioctl.patch Patch9155: 0156-cleancode-refactor-memp.patch Patch9156: 0157-cleancode-refactor-offload.patch Patch9157: 0158-enable-sys_arch-failed-log.patch +Patch9158: 0159-LOOPBACK-fix-loop-coredump.patch BuildRequires: gcc-c++ dos2unix dpdk-devel @@ -199,6 +200,10 @@ cd %{_builddir}/%{name}-%{version}/src %{_libdir}/liblwip.a %changelog +* Tue Jul 23 2024 yinbin - 2.2.0-50 +- LOOPBACK: fix loop coredump + + * Tue Jul 23 2024 LemmyHuang - 2.2.0-49 - cleancode: refactor offload - enable sys_arch failed log -- Gitee