From a9bafd5aebc3236be0dddb2c8279088e0634e843 Mon Sep 17 00:00:00 2001 From: liyunqing Date: Fri, 15 Mar 2024 17:53:02 +0800 Subject: [PATCH] recv support SO_RCVTIMEO (cherry picked from commit 8852706f49d5766f31df31192517b5c40b4a0a9a) --- ...CVTIMEO-to-support-recv-accept-timeo.patch | 25 +++++++++++++++++++ lwip.spec | 6 ++++- 2 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 0115-enable-LWIP_SO_RCVTIMEO-to-support-recv-accept-timeo.patch diff --git a/0115-enable-LWIP_SO_RCVTIMEO-to-support-recv-accept-timeo.patch b/0115-enable-LWIP_SO_RCVTIMEO-to-support-recv-accept-timeo.patch new file mode 100644 index 0000000..3f2e23d --- /dev/null +++ b/0115-enable-LWIP_SO_RCVTIMEO-to-support-recv-accept-timeo.patch @@ -0,0 +1,25 @@ +From f0ca9ad7361b943c0ce84bad8dc2655a90e38ca4 Mon Sep 17 00:00:00 2001 +From: liyunqing +Date: Fri, 15 Mar 2024 17:49:27 +0800 +Subject: [PATCH] enable LWIP_SO_RCVTIMEO to support recv\accept timeout + +--- + src/include/lwipopts.h | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/src/include/lwipopts.h b/src/include/lwipopts.h +index d067dea..3b8de83 100644 +--- a/src/include/lwipopts.h ++++ b/src/include/lwipopts.h +@@ -257,6 +257,8 @@ + + #define SIOCSHIWAT 1 + ++#define LWIP_SO_RCVTIMEO 1 ++ + /* + ------------------------------------ + --------- Debug log options -------- +-- +2.27.0 + diff --git a/lwip.spec b/lwip.spec index 77092c5..cd23290 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: 7 +Release: 8 License: BSD URL: http://savannah.nongnu.org/projects/lwip/ Source0: http://download.savannah.nongnu.org/releases/lwip/%{name}-%{version}.zip @@ -126,6 +126,7 @@ 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 Patch9113: 0114-sync-recv-flags-with-linux-kernel.patch +Patch9114: 0115-enable-LWIP_SO_RCVTIMEO-to-support-recv-accept-timeo.patch BuildRequires: gcc-c++ dos2unix dpdk-devel @@ -155,6 +156,9 @@ cd %{_builddir}/%{name}-%{version}/src %{_libdir}/liblwip.a %changelog +* Fri Mar 15 2024 liyunqing - 2.2.0-8 +- enable LWIP_SO_RCVTIMEO to support recv\accept timeout + * Mon Mar 11 2024 liyunqing - 2.2.0-7 - sync macros with kernel defined which use in recv and send