fix duplicate pbuf_free in udp_sendto

This commit is contained in:
liyunqing 2024-03-07 11:22:46 +08:00 committed by jiangheng
parent 5042819c0a
commit 9968ddd49b
2 changed files with 29 additions and 1 deletions

View File

@ -0,0 +1,24 @@
From 3b0bca4b38276c95f1305247ebf8a3db02ff5d83 Mon Sep 17 00:00:00 2001
From: liyunqing <liyunqing@kylinos.cn>
Date: Thu, 7 Mar 2024 11:18:00 +0800
Subject: [PATCH] fix duplicate pbuf_free in udp_sendto
---
src/core/udp.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/src/core/udp.c b/src/core/udp.c
index 440f909..ff5c99b 100644
--- a/src/core/udp.c
+++ b/src/core/udp.c
@@ -680,7 +680,6 @@ udp_sendto_chksum(struct udp_pcb *pcb, struct pbuf *p, const ip_addr_t *dst_ip,
struct pbuf *udp_pbuf = do_lwip_get_from_sendring((struct lwip_sock *)(p->payload), p->tot_len, &apiflags);
do_lwip_get_from_sendring_over((struct lwip_sock *)(p->payload));
- pbuf_free(p);
p = udp_pbuf;
if (p == NULL) {
return ERR_MEM;
--
2.27.0

View File

@ -4,7 +4,7 @@
Summary: lwip is a small independent implementation of the TCP/IP protocol suite
Name: lwip
Version: 2.2.0
Release: 5
Release: 6
License: BSD
URL: http://savannah.nongnu.org/projects/lwip/
Source0: http://download.savannah.nongnu.org/releases/lwip/%{name}-%{version}.zip
@ -124,6 +124,7 @@ Patch9108: 0109-support-udp-recv-zero-packets.patch
Patch9109: 0110-adapt-lwip-2.2.0.patch
Patch9110: 0111-support-udp-pkglen-mtu-modify-IP_REASS_MAX_PBUFS.patch
Patch9111: 0112-support-udp-pkglen-mtu-modify-netbuf_alloc-size.patch
Patch9112: 0113-fix-duplicate-pbuf_free-in-udp_sendto.patch
BuildRequires: gcc-c++ dos2unix dpdk-devel
@ -153,6 +154,9 @@ cd %{_builddir}/%{name}-%{version}/src
%{_libdir}/liblwip.a
%changelog
* Thu Mar 7 2024 liyunqing <liyunqing@kylinos.cn> - 2.2.0-6
- fix duplicate pbuf_free in udp_sendto
* Wed Mar 6 2024 yangchen <yangchen145@huawei.com> - 2.2.0-5
- support udp pkglen > mtu: modify netbuf_alloc size