Hello,
I was browsing the code in core/ipv4/igmp.c and I am a bit confused by the means by which the multicast group state gets set to IGMP_GROUP_IDLE_MEMBER.
For reference, here is the IGMPv2 RFC section that describes the state diagram for an IGMP host:
https://tools.ietf.org/html/rfc2236#section-6 (scroll down for an ASCII-art diagram).
The RFC says that state should transition from IGMP_GROUP_DELAYING_MEMBER to IGMP_GROUP_IDLE_MEMBER when the timer expires. However, in igmp.c, we see that igmp_timeout() sends the group report as expected, but does not transition state. In fact, the state variable is only set to IDLE_MEMBER in two places: from igmp_start() which is called once during interface bringup, and when the interface receives a group report while waiting to send its own.
Therefore, the only condition that can cancel the DELAYING_MEMBER state and return to an IDLE_MEMBER state is when a group member receives a group report from some other host belonging to the same group, which is not necessarily going to happen.
Shouldn't the group get set into IGMP_GROUP_IDLE_MEMBER state from igmp_timeout()?