igmp: leave groups in 224.0.0.0/24 to flooding

The switch keeps flooding 224.0.0.0/24 with IGMP on, but a report for a
group in that block still made an entry for it, and the entry limited
the group to the ports that reported it. A host announcing mDNS on
224.0.0.251 thereby cut mDNS off from every other port. Such reports
are now ignored, as RFC 4541 asks.
This commit is contained in:
DrDoof committed 2026-10-09 18:02:41 +02:00
1 parent e67c928eb7
commit f88f655f5a
3 files changed
+6

No files matched your search

+3
View File
@@ -85,6 +85,9 @@ for frames to 01:00:5e:xx:xx:xx and returns 0 when the frame is not a trapped IG
so that it is passed on to the IP stack. IGMPv1/v2 reports (0x12, 0x16) join the group given
in the IGMP header, IGMPv2 leaves (0x17) leave it, IGMPv3 reports use the first group record
(type 4 joins, type 3 leaves). Trapped IGMP frames arrive without a VLAN tag.
Reports for groups in 224.0.0.0/24 are ignored: the switch floods that block
even with IGMP on, and an entry for a group such as 224.0.0.251 (mDNS) would
otherwise limit it to the ports that reported it, as RFC 4541 warns against.
`igmp_show()` prints out the IGMP configuration on the CLI.
+2
View File
@@ -250,6 +250,8 @@ uint8_t igmp_packet_handler(void) __banked
#ifdef DEBUG
print_string("IGMP join "); print_byte(igmp_join); write_char('\n');
#endif
if (uip_buf[igmp_grp] == IGMP_LOCAL_NET_0 && !uip_buf[igmp_grp + 1] && !uip_buf[igmp_grp + 2])
return 1;
#ifdef IPMC_USES_L3MC
memset((__xdata uint8_t *)&entry, 0, sizeof(struct ipmc_table_entry));
+1
View File
@@ -10,6 +10,7 @@
#define IGMP_V3_REPORT 0x22
#define IGMP_V3_TO_INCLUDE 3
#define IGMP_V3_TO_EXCLUDE 4
#define IGMP_LOCAL_NET_0 224
void igmp_setup(void) __banked;
void igmp_enable(void) __banked;