If send the igmp packet when lower interface is down, the packet will be
freed twice and show error log. Remove the net_pkt_unref in igmp_send(),
and let the caller free it.
Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
Made the definition of in_addr all_routers conditional to remove
compiler warning:
warning: 'all_routers' defined but not used [-Wunused-const-variable=]
The warning occurs when igmpv3 is enabled.
Signed-off-by: Ibe Van de Veire <ibe.vandeveire@basalte.be>
Added igmpv3 support based on the already existing structure for igmpv2.
The already existing api is not modified to prevent breaking exisiting
applications.
Signed-off-by: Ibe Van de Veire <ibe.vandeveire@basalte.be>
Added igmpv3 checksum function to make it possible to calculate the
checksum of a complete igmpv3 pkt at once.
Signed-off-by: Ibe Van de Veire <ibe.vandeveire@basalte.be>
Provide an extra struct net_if * iface parameter to
net_if_ipv*_maddr_join/leave functions, so that the corresponding
interface context, the mcast address belong to, can be locked for the
operation.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
The purpose of the change was to have the Zephyr network stack
internally add the IGMP all systems 224.0.0.1 multicast address to a
multicast membership list so that multicast hash filter implementations
can add this address to the hash filter.
Fixes#53548
Signed-off-by: Chamira Perera <chamira.perera@audinate.com>
As per RFC 2236 Section 9, the IGMP V2 membership reports should be sent
to the group multicast address being reported. Without this fix, when
IGMP snooping is enabled on a network a device is not able to receive
multicast from certain multicast addresses e.g. 239.255.x.x.
Fixes#52449
Signed-off-by: Chamira Perera <chamira.perera@audinate.com>
Logging v1 has been removed and log_strdup wrapper function is no
longer needed. Removing the function and its use in the tree.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
In order to bring consistency in-tree, migrate all subsystems code to
the new prefix <zephyr/...>. Note that the conversion has been scripted,
refer to zephyrproject-rtos#45388 for more details.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Replace unpacked in_addr structures with raw buffers in net_ipv4_hdr
struct, to prevent compiler warnings about unaligned access.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
The return value might be uninitialized if there was no
suitable IPv4 address found for the network interface.
Coverity-CID: 224630
Fixes#35158
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>