-
Notifications
You must be signed in to change notification settings - Fork 6
Description
When multicast group is established (the first igmp subscriber appears, either user-defined or dynamic), all mrouter ports in the same vlan as the multicast group must implicitly become group members.
This is currently worked around in userspace by "show ip igmp snooping groups" command handler by fetching the mrouter list from kernel and adding those interfaces to the (internally-cooked) group list structure. The problem is that multicast traffic belonging to that group is not actually forwarded to mrouter ports.
Fixing approach: also create special fdb entries for mrouter ports, but only when multicast group is actually established (the first igmp subscriber appears, either user-defined or dynamic).
Corner cases:
- when new mrouter appears, a special fdb entry must be added for all
established groups in vlan; - when mrouter disappears, all corresponding fdb entries must be removed;
- when group disappears (last subscriber is gone), all corresponding mrouter
special fdb entries must be removed
Synchronization: the general fdb synchronization approach (test -> lock -> test again -> change -> unlock) is also suitable for igmp snooping special entries. Note that by design this mechanism allows changing the fdb from both process and softirq (packet processing) context. Thus it is suitable for igmp snooping, as changes occur from both contexts.