diff --git a/0179-fix-pcb.tcp-null-pointer-error-when-netperf-recv-RST.patch b/0179-fix-pcb.tcp-null-pointer-error-when-netperf-recv-RST.patch new file mode 100644 index 0000000000000000000000000000000000000000..6e25a9f97493511a1de4ff749b19df3b320eca58 --- /dev/null +++ b/0179-fix-pcb.tcp-null-pointer-error-when-netperf-recv-RST.patch @@ -0,0 +1,34 @@ +From af04d2037d5813f2bcbbc26ea3dea389556b2bea Mon Sep 17 00:00:00 2001 +From: yangchen +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 + diff --git a/lwip.spec b/lwip.spec index 64a01d004c9610240e5d75a0a2280f9dd09c3a39..2a6e545cfc817cdf1de604a1b1d5e73471fa6c40 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.2.0 -Release: 67 +Release: 68 License: BSD URL: http://savannah.nongnu.org/projects/lwip/ 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 Patch9177: 0177-pingpong-fix-spelling-error.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 @@ -221,6 +222,9 @@ cd %{_builddir}/%{name}-%{version}/src %{_libdir}/liblwip.a %changelog +* Tue Jan 14 2025 yangchen - 2.2.0-68 +- fix pcb.tcp null pointer error when netperf recv RST + * Tue Dec 10 2024 jiangheng - 2.2.0-67 - add recv_block in lwip_sock