diff --git a/0117-udp-muticast-loop.patch b/0117-udp-muticast-loop.patch new file mode 100644 index 0000000..bd67623 --- /dev/null +++ b/0117-udp-muticast-loop.patch @@ -0,0 +1,70 @@ +From 74d87ad663f013e792a9ea5d004eae139cd2e0a0 Mon Sep 17 00:00:00 2001 +From: compile_success <980965867@qq.com> +Date: Sat, 9 Mar 2024 06:45:25 +0000 +Subject: [PATCH] support loop mode + +--- + src/core/netif.c | 8 ++++++++-- + src/include/lwip/netif.h | 4 ++++ + 2 files changed, 12 insertions(+), 2 deletions(-) + +diff --git a/src/core/netif.c b/src/core/netif.c +index 8302bd5..79f2317 100644 +--- a/src/core/netif.c ++++ b/src/core/netif.c +@@ -1117,6 +1117,10 @@ netif_set_link_callback(struct netif *netif, netif_status_callback_fn link_callb + */ + err_t + netif_loop_output(struct netif *netif, struct pbuf *p) ++#else ++err_t ++udp_netif_loop_output(struct netif *netif, struct pbuf *p) ++#endif + { + struct pbuf *r; + err_t err; +@@ -1218,7 +1224,6 @@ netif_loop_output(struct netif *netif, struct pbuf *p) + + return ERR_OK; + } +-#endif + + #if LWIP_HAVE_LOOPIF + #if LWIP_IPV4 +@@ -1249,6 +1254,10 @@ netif_loop_output_ipv6(struct netif *netif, struct pbuf *p, const ip6_addr_t *ad + */ + void + netif_poll(struct netif *netif) ++#else ++void ++udp_netif_poll(struct netif *netif) ++#endif + { + /* If we have a loopif, SNMP counters are adjusted for it, + * if not they are adjusted for 'netif'. */ +@@ -1312,7 +1321,6 @@ netif_poll(struct netif *netif) + } + SYS_ARCH_UNPROTECT(lev); + } +-#endif + + #if !LWIP_NETIF_LOOPBACK_MULTITHREADING + /** +diff --git a/src/include/lwip/netif.h b/src/include/lwip/netif.h +index d10d4e8..d8f1f45 100644 +--- a/src/include/lwip/netif.h ++++ b/src/include/lwip/netif.h +@@ -538,6 +538,10 @@ void netif_set_link_callback(struct netif *netif, netif_status_callback_fn link_ + #if ENABLE_LOOPBACK + err_t netif_loop_output(struct netif *netif, struct pbuf *p); + void netif_poll(struct netif *netif); ++#if GAZELLE_ENABLE ++err_t udp_netif_loop_output(struct netif *netif, struct pbuf *p); ++void udp_netif_poll(struct netif *netif); ++#endif + #if !LWIP_NETIF_LOOPBACK_MULTITHREADING + void netif_poll_all(void); + #endif /* !LWIP_NETIF_LOOPBACK_MULTITHREADING */ +-- +2.33.0 + diff --git a/lwip.spec b/lwip.spec index 6d375bf..650b5a1 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: 9 +Release: 10 License: BSD URL: http://savannah.nongnu.org/projects/lwip/ Source0: http://download.savannah.nongnu.org/releases/lwip/%{name}-%{version}.zip @@ -128,6 +128,7 @@ 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 Patch9115: 0116-transfer-pbuf-timestamp-in-ip-frag.patch +Patch9116: 0117-udp-muticast-loop.patch BuildRequires: gcc-c++ dos2unix dpdk-devel @@ -157,6 +158,9 @@ cd %{_builddir}/%{name}-%{version}/src %{_libdir}/liblwip.a %changelog +* Fri Mar 22 2024 zhujunhao - 2.2.0-10 +- add udp muticast loop + * Mon Mar 18 2024 yangchen - 2.2.0-9 - tansfer pbuf timestamp in ip frag