!651 [sync] PR-618: fix the coredump issue when UDP traffic is sent

From: @openeuler-sync-bot 
Reviewed-by: @jiangheng12 
Signed-off-by: @jiangheng12
This commit is contained in:
openeuler-ci-bot 2023-12-10 06:43:55 +00:00 committed by Gitee
commit 0bb5878b84
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 35 additions and 1 deletions

View File

@ -0,0 +1,30 @@
From defef8f57ee35b510c4a542e54237f664ac31d5d Mon Sep 17 00:00:00 2001
From: root <wuchangye@huawei.com>
Date: Sat, 9 Dec 2023 16:54:47 +0800
Subject: [PATCH] fix the coredump issue when UDP traffic is sent
---
src/api/sockets.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/api/sockets.c b/src/api/sockets.c
index d488b5b..a9d39ae 100644
--- a/src/api/sockets.c
+++ b/src/api/sockets.c
@@ -1865,7 +1865,13 @@ lwip_sendto(int s, const void *data, size_t size, int flags,
} else
#endif /* LWIP_CHECKSUM_ON_COPY */
{
+#if GAZELLE_ENABLE
+ /* In the gazelle scenario, the payload is stored in send_ring,
+ and the payload stores the sock pointer information. */
+ buf.p->payload = (void *)sock;
+#else
MEMCPY(buf.p->payload, data, short_size);
+#endif
}
err = ERR_OK;
}
--
2.30.0

View File

@ -4,7 +4,7 @@
Summary: lwip is a small independent implementation of the TCP/IP protocol suite
Name: lwip
Version: 2.1.3
Release: 94
Release: 95
License: BSD
URL: http://savannah.nongnu.org/projects/lwip/
Source0: http://download.savannah.nongnu.org/releases/lwip/%{name}-%{version}.zip
@ -105,6 +105,7 @@ Patch9087: 0088-modify-log-info-err.patch
Patch9088: 0089-add-struct-gz-addr.patch
Patch9089: 0090-frag-fix-coredump-when-get-netif.patch
Patch9090: 0091-add-fd-log-info-and-fix-wrong-port-log-info.patch
Patch9091: 0092-fix-the-coredump-issue-when-UDP-traffic-is-sent.patch
BuildRequires: gcc-c++ dos2unix dpdk-devel
@ -135,6 +136,9 @@ cd %{_builddir}/%{name}-%{version}/src
%{_libdir}/liblwip.a
%changelog
* Sat Dec 9 2023 wuchangye <wuchangye@huawei.com> - 2.1.3-95
- fix the coredump issue when UDP traffic is sent
* Fri Dec 8 2023 yangchen <yangchen145@huawei.com> - 2.1.3-94
- add fd log info and fix wrong port log info