!1389 [sync] PR-1381: fix pcb.tcp null pointer error when netperf recv RST
From: @openeuler-sync-bot Reviewed-by: @compile_success, @jiangheng12 Signed-off-by: @jiangheng12, @compile_success
This commit is contained in:
commit
3a384a0332
@ -0,0 +1,34 @@
|
|||||||
|
From af04d2037d5813f2bcbbc26ea3dea389556b2bea Mon Sep 17 00:00:00 2001
|
||||||
|
From: yangchen <yangchen145@huawei.com>
|
||||||
|
Date: Mon, 13 Jan 2025 10:41:10 +0800
|
||||||
|
Subject: [PATCH] fix pcb.tcp null pointer error when netperf recv RST
|
||||||
|
|
||||||
|
---
|
||||||
|
src/api/sockets.c | 4 ++--
|
||||||
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/api/sockets.c b/src/api/sockets.c
|
||||||
|
index 69c3086..9fafca3 100644
|
||||||
|
--- a/src/api/sockets.c
|
||||||
|
+++ b/src/api/sockets.c
|
||||||
|
@@ -3147,7 +3147,7 @@ lwip_getsockopt_impl(int s, int level, int optname, void *optval, socklen_t *opt
|
||||||
|
#endif /* LWIP_SO_RCVTIMEO */
|
||||||
|
#if GAZELLE_SO_SNDBUF
|
||||||
|
case SO_SNDBUF:
|
||||||
|
- LWIP_SOCKOPT_CHECK_OPTLEN_CONN(sock, *optlen, tcpwnd_size_t);
|
||||||
|
+ LWIP_SOCKOPT_CHECK_OPTLEN_CONN_PCB(sock, *optlen, tcpwnd_size_t);
|
||||||
|
if (netconn_type(sock->conn) == NETCONN_TCP) {
|
||||||
|
*(tcpwnd_size_t *)optval = netconn_get_sndbufsize(sock->conn);
|
||||||
|
}
|
||||||
|
@@ -3556,7 +3556,7 @@ lwip_setsockopt_impl(int s, int level, int optname, const void *optval, socklen_
|
||||||
|
#endif /* LWIP_SO_RCVTIMEO */
|
||||||
|
#if GAZELLE_SO_SNDBUF
|
||||||
|
case SO_SNDBUF:
|
||||||
|
- LWIP_SOCKOPT_CHECK_OPTLEN_CONN(sock, optlen, tcpwnd_size_t);
|
||||||
|
+ LWIP_SOCKOPT_CHECK_OPTLEN_CONN_PCB(sock, optlen, tcpwnd_size_t);
|
||||||
|
if (netconn_type(sock->conn) == NETCONN_TCP) {
|
||||||
|
netconn_set_sndbufsize(sock->conn, *(const tcpwnd_size_t *)optval);
|
||||||
|
}
|
||||||
|
--
|
||||||
|
2.33.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.2.0
|
Version: 2.2.0
|
||||||
Release: 67
|
Release: 68
|
||||||
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
|
||||||
@ -192,6 +192,7 @@ Patch9175: 0176-fix-no-ack-response-when-lcoal-only-receive-but-not-.patch
|
|||||||
Patch9176: 0001-bug-free-sock-when-func-goto-out.patch
|
Patch9176: 0001-bug-free-sock-when-func-goto-out.patch
|
||||||
Patch9177: 0177-pingpong-fix-spelling-error.patch
|
Patch9177: 0177-pingpong-fix-spelling-error.patch
|
||||||
Patch9178: 0178-add-recv_block-in-lwip_sock.patch
|
Patch9178: 0178-add-recv_block-in-lwip_sock.patch
|
||||||
|
Patch9179: 0179-fix-pcb.tcp-null-pointer-error-when-netperf-recv-RST.patch
|
||||||
|
|
||||||
BuildRequires: gcc-c++ dos2unix dpdk-devel
|
BuildRequires: gcc-c++ dos2unix dpdk-devel
|
||||||
|
|
||||||
@ -221,6 +222,9 @@ cd %{_builddir}/%{name}-%{version}/src
|
|||||||
%{_libdir}/liblwip.a
|
%{_libdir}/liblwip.a
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Jan 14 2025 yangchen <yangchen145@huawei.com> - 2.2.0-68
|
||||||
|
- fix pcb.tcp null pointer error when netperf recv RST
|
||||||
|
|
||||||
* Tue Dec 10 2024 jiangheng <jiangheng14@huawei.com> - 2.2.0-67
|
* Tue Dec 10 2024 jiangheng <jiangheng14@huawei.com> - 2.2.0-67
|
||||||
- add recv_block in lwip_sock
|
- add recv_block in lwip_sock
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user