Skip to content

Conversation

@IVandeVeire
Copy link
Contributor

@IVandeVeire IVandeVeire commented Oct 14, 2024

Fixes #79788

Also added the ability to read IGMPv3 messages when only IGMPv2 is enabled as described in RFC2236 section 2.5.

I think this should also be backported to v3.7.

@IVandeVeire IVandeVeire changed the title Igmp bug fix net: ip: igmp: Fix IGMP determination Oct 14, 2024
@IVandeVeire IVandeVeire force-pushed the igmp-bug-fix branch 2 times, most recently from 1b766db to dfb0ec2 Compare October 14, 2024 09:50
@pdgendt pdgendt added the backport v3.7-branch Request backport to the v3.7-branch label Oct 14, 2024
jukkar
jukkar previously approved these changes Oct 14, 2024
rlubos
rlubos previously approved these changes Oct 14, 2024
pdgendt
pdgendt previously approved these changes Oct 14, 2024
The header length of the net ip packet was calculated using only the
net_pkt_ip_hdr_len function. The correct header length should be
calculated by adding net_pkt_ip_hdr_len and net_pkt_ipv4_opts_len. This
resulted in an incorrect IGMP version type in case of IGMPv2 message
(when IGMPv3 was enabled). The IGMP message was not parsed correctly and
therefore dropped.

Signed-off-by: Ibe Van de Veire <ibe.vandeveire@basalte.be>
According to RFC2236 section 2.5, the IGMP message may be longer then 8
bytes. The rest of the bytes should be ignored.

Signed-off-by: Ibe Van de Veire <ibe.vandeveire@basalte.be>
rlubos
rlubos previously approved these changes Oct 16, 2024
pdgendt
pdgendt previously approved these changes Oct 16, 2024
jukkar
jukkar previously approved these changes Oct 16, 2024
@IVandeVeire IVandeVeire force-pushed the igmp-bug-fix branch 2 times, most recently from a00f991 to c21667a Compare October 16, 2024 15:18
Add igmp.h file to declare definitions for IGMP that are not meant te be
included by the application but can be used in e.g. tests.

Signed-off-by: Ibe Van de Veire <ibe.vandeveire@basalte.be>
Added extra testcases for the IGMPv3 protocol. The IGMP driver is
supposed to send an IGMPv3 report when joining a group.

Signed-off-by: Ibe Van de Veire <ibe.vandeveire@basalte.be>
@carlescufi carlescufi merged commit e6dd4cd into zephyrproject-rtos:main Oct 17, 2024
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: Networking backport v3.7-branch Request backport to the v3.7-branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

net: ip: igmp: IGMPv2 does not work when IGMPv3 is enabled

6 participants