add MCAST_JOIN_SOURCE_GROUP to setsockopt for igmpv3
(cherry picked from commit 781677e2626ab21683cb1fba9a020f90d4cb6d1f)
This commit is contained in:
parent
18a6b21359
commit
83f81bf594
@ -0,0 +1,33 @@
|
||||
diff -Nur lwip-2.2.0old/src/api/sockets.c lwip-2.2.0/src/api/sockets.c
|
||||
--- lwip-2.2.0old/src/api/sockets.c 2024-04-29 10:39:04.721200645 +0800
|
||||
+++ lwip-2.2.0/src/api/sockets.c 2024-04-29 11:21:09.036645032 +0800
|
||||
@@ -3859,6 +3859,29 @@
|
||||
return ENOPROTOOPT;
|
||||
}
|
||||
break;
|
||||
+ case MCAST_JOIN_SOURCE_GROUP:
|
||||
+ case MCAST_LEAVE_SOURCE_GROUP:
|
||||
+ LWIP_SOCKOPT_CHECK_OPTLEN_CONN_PCB(sock, optlen, struct group_source_req);
|
||||
+ if ((((const struct group_source_req *)optval)->gsr_group.ss_family != AF_INET) ||
|
||||
+ (((const struct group_source_req *)optval)->gsr_source.ss_family != AF_INET)) {
|
||||
+ done_socket(sock);
|
||||
+ return EINVAL;
|
||||
+ }
|
||||
+#if LWIP_UDP
|
||||
+ if (NETCONNTYPE_GROUP(netconn_type(sock->conn)) == NETCONN_UDP) {
|
||||
+ err = mcast_sock_join_leave_source_group(s,&sock->conn->pcb.udp->ipmc, optname, (const struct group_source_req *)optval);
|
||||
+ } else
|
||||
+#endif /* LWIP_UDP */
|
||||
+#if LWIP_RAW
|
||||
+ if (NETCONNTYPE_GROUP(netconn_type(sock->conn)) == NETCONN_RAW) {
|
||||
+ err = mcast_sock_join_leave_source_group(s,&sock->conn->pcb.raw->ipmc, optname, (const struct group_source_req *)optval);
|
||||
+ } else
|
||||
+#endif /* LWIP_RAW */
|
||||
+ {
|
||||
+ done_socket(sock);
|
||||
+ return ENOPROTOOPT;
|
||||
+ }
|
||||
+ break;
|
||||
#endif /* LWIP_IGMP */
|
||||
default:
|
||||
LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_setsockopt(%d, IPPROTO_IP, UNIMPL: optname=0x%x, ..)\n",
|
||||
@ -4,7 +4,7 @@
|
||||
Summary: lwip is a small independent implementation of the TCP/IP protocol suite
|
||||
Name: lwip
|
||||
Version: 2.2.0
|
||||
Release: 20
|
||||
Release: 21
|
||||
License: BSD
|
||||
URL: http://savannah.nongnu.org/projects/lwip/
|
||||
Source0: http://download.savannah.nongnu.org/releases/lwip/%{name}-%{version}.zip
|
||||
@ -139,6 +139,7 @@ Patch9123: 0124-fix-udp-recv-memleak.patch
|
||||
Patch9124: 0125-add-MCAST_JOIN_SOURCE_GROUP-to-setsockopt-for-mldv2.patch
|
||||
Patch9125: 0126-add-stats_proto-in-out-to-xmit-recv.patch
|
||||
Patch9126: 0127-add-MCAST_BLOCK_SOURCE-to-setsockopt-for-mldv2.patch
|
||||
Patch9127: 0128-add-MCAST_JOIN_SOURCE_GROUP-to-setsockopt-for-igmpv3.patch
|
||||
|
||||
BuildRequires: gcc-c++ dos2unix dpdk-devel
|
||||
|
||||
@ -168,6 +169,9 @@ cd %{_builddir}/%{name}-%{version}/src
|
||||
%{_libdir}/liblwip.a
|
||||
|
||||
%changelog
|
||||
* Mon Apr 29 2024 zhangyulong <zhangyulong@kylinos.cn> - 2.2.0-21
|
||||
add option MCAST_JOIN_SOURCE_GROUP to the setsockopt for the igmpv3 protocol
|
||||
|
||||
* Mon Apr 29 2024 wanfeng <wanfeng@kylinos.cn> - 2.2.0-20
|
||||
- add option MCAST_BLOCK_SOURCE to the setsockopt for the mldv2 protocol
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user