pbuf: fix pbuf->tot_len incorrect after pbuf_split_64k is called
This commit is contained in:
parent
a1a5b8d972
commit
4e6ef43965
@ -0,0 +1,35 @@
|
|||||||
|
From 339ad47548236f2b11ee6161a419db8aa664138c Mon Sep 17 00:00:00 2001
|
||||||
|
From: jiangheng <jiangheng14@huawei.com>
|
||||||
|
Date: Fri, 15 Sep 2023 09:33:56 +0800
|
||||||
|
Subject: [PATCH] fix pbuf->tot_len incorrect after pbuf_split_64k is called
|
||||||
|
|
||||||
|
---
|
||||||
|
src/core/pbuf.c | 5 +----
|
||||||
|
1 file changed, 1 insertion(+), 4 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/core/pbuf.c b/src/core/pbuf.c
|
||||||
|
index 2385e57..8a55463 100644
|
||||||
|
--- a/src/core/pbuf.c
|
||||||
|
+++ b/src/core/pbuf.c
|
||||||
|
@@ -1194,7 +1194,7 @@ void pbuf_split_64k(struct pbuf *p, struct pbuf **rest)
|
||||||
|
if (r != NULL) {
|
||||||
|
/* Update the tot_len field in the first part */
|
||||||
|
for (i = p; i != NULL; i = i->next) {
|
||||||
|
- i->tot_len = tot_len_front;
|
||||||
|
+ i->tot_len = (u16_t)(i->tot_len - r->tot_len);
|
||||||
|
LWIP_ASSERT("tot_len/len mismatch in last pbuf",
|
||||||
|
(i->next != NULL) || (i->tot_len == i->len));
|
||||||
|
}
|
||||||
|
@@ -1205,9 +1205,6 @@ void pbuf_split_64k(struct pbuf *p, struct pbuf **rest)
|
||||||
|
/* tot_len field in rest does not need modifications */
|
||||||
|
/* reference counters do not need modifications */
|
||||||
|
*rest = r;
|
||||||
|
- r->tot_len = r->len;
|
||||||
|
- }else{
|
||||||
|
- p->tot_len = tot_len_front;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
--
|
||||||
|
2.27.0
|
||||||
|
|
||||||
@ -4,7 +4,7 @@
|
|||||||
Summary: lwip is a small independent implementation of the TCP/IP protocol suite
|
Summary: lwip is a small independent implementation of the TCP/IP protocol suite
|
||||||
Name: lwip
|
Name: lwip
|
||||||
Version: 2.1.3
|
Version: 2.1.3
|
||||||
Release: 75
|
Release: 76
|
||||||
License: BSD
|
License: BSD
|
||||||
URL: http://savannah.nongnu.org/projects/lwip/
|
URL: http://savannah.nongnu.org/projects/lwip/
|
||||||
Source0: http://download.savannah.nongnu.org/releases/lwip/%{name}-%{version}.zip
|
Source0: http://download.savannah.nongnu.org/releases/lwip/%{name}-%{version}.zip
|
||||||
@ -82,6 +82,7 @@ Patch9066: 0067-fix-null-pointer-when-all-zero-address-listen.patch
|
|||||||
Patch9067: 0068-enable-UDP-CKSUM-in-lwip.patch
|
Patch9067: 0068-enable-UDP-CKSUM-in-lwip.patch
|
||||||
Patch9068: 0069-add-error-check-in-hugepage_init-and-sys_mbox_free.patch
|
Patch9068: 0069-add-error-check-in-hugepage_init-and-sys_mbox_free.patch
|
||||||
Patch9069: 0070-add-CHECKSUM_UDP-when-not-support-OFFLOAD_UDP_CHECKS.patch
|
Patch9069: 0070-add-CHECKSUM_UDP-when-not-support-OFFLOAD_UDP_CHECKS.patch
|
||||||
|
Patch9070: 0071-fix-pbuf-tot_len-incorrect-after-pbuf_split_64k-is-c.patch
|
||||||
|
|
||||||
BuildRequires: gcc-c++ dos2unix dpdk-devel
|
BuildRequires: gcc-c++ dos2unix dpdk-devel
|
||||||
|
|
||||||
@ -112,6 +113,9 @@ cd %{_builddir}/%{name}-%{version}/src
|
|||||||
%{_libdir}/liblwip.a
|
%{_libdir}/liblwip.a
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Sep 15 2023 jiangheng <jiangheng14@huawei.com> - 2.1.3-76
|
||||||
|
- fix pbuf->tot_len incorrect after pbuf_split_64k is called
|
||||||
|
|
||||||
* Tue Jun 27 2023 kircher <majun65@huawei.com> - 2.1.3-75
|
* Tue Jun 27 2023 kircher <majun65@huawei.com> - 2.1.3-75
|
||||||
- add CHECKSUM_UDP when not support OFFLOAD_UDP_CHECKS
|
- add CHECKSUM_UDP when not support OFFLOAD_UDP_CHECKS
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user