diff --git a/0061-fix-pbuf-leak-in-udp-connection.patch b/0061-fix-pbuf-leak-in-udp-connection.patch new file mode 100644 index 0000000..a75e3fd --- /dev/null +++ b/0061-fix-pbuf-leak-in-udp-connection.patch @@ -0,0 +1,29 @@ +From 21f7f9a5bdfd5d2f592af19e73647a48fdbb7bf1 Mon Sep 17 00:00:00 2001 +From: kircher +Date: Tue, 16 May 2023 19:07:42 +0800 +Subject: [PATCH] fix pbuf leak in udp connection + +--- + src/core/udp.c | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/src/core/udp.c b/src/core/udp.c +index 1398537..9c3cdaa 100644 +--- a/src/core/udp.c ++++ b/src/core/udp.c +@@ -933,8 +933,11 @@ udp_sendto_if_src_chksum(struct udp_pcb *pcb, struct pbuf *p, const ip_addr_t *d + /* @todo: must this be increased even if error occurred? */ + MIB2_STATS_INC(mib2.udpoutdatagrams); + ++#if !GAZELLE_ENABLE + /* did we chain a separate header pbuf earlier? */ +- if (q != p) { ++ if (q != p) ++#endif ++ { + /* free the header pbuf */ + pbuf_free(q); + q = NULL; +-- +2.33.0 + diff --git a/lwip.spec b/lwip.spec index 5d6ad7e..c61a9a7 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.1.3 -Release: 51 +Release: 52 License: BSD URL: http://savannah.nongnu.org/projects/lwip/ Source0: http://download.savannah.nongnu.org/releases/lwip/%{name}-%{version}.zip @@ -72,6 +72,7 @@ Patch9056: 0057-same-node-gazellectl-a.patch Patch9057: 0058-lwip-send-recv-thread-bind-numa.patch Patch9058: 0059-fix-last_unsent-last_unacked.patch Patch9059: 0060-lwip-add-udp-multicast.patch +Patch9060: 0061-fix-pbuf-leak-in-udp-connection.patch BuildRequires: gcc-c++ dos2unix dpdk-devel @@ -148,6 +149,7 @@ find %{_builddir}/%{name}-%{version} -type f -exec dos2unix -q {} \; %patch9057 -p1 %patch9058 -p1 %patch9059 -p1 +%patch9060 -p1 %build cd %{_builddir}/%{name}-%{version}/src @@ -163,6 +165,9 @@ cd %{_builddir}/%{name}-%{version}/src %{_libdir}/liblwip.a %changelog +* Mon May 16 2023 kircher - 2.1.3-52 +- fix pbuf leak in udp connection + * Fri May 12 2023 kircher - 2.1.3-51 - add udp multicast support in lwip