So far, the recently added multicast optimizations did not support a configuration where a bridge is on top of the soft-interface (e.g. bat0).
Now the Linux bridge code is able to provide us with the missing bits:
Multicast Listeners: The bridge hands us a list of multicast listeners it has detected behind the bridge which we will announce through the mesh via the translation table, allowing other nodes to direct multicast packets to these clients behind the bridge even with enabled multicast optimizations.
Queriers: The bridge informs us whether there is a selected IGMP or MLD querier behind the bridge or if there is no querier at all. In these cases we need all according IPv4 or IPv6 multicast traffic directed to us.
These two parts together allow us to serve all multicast listeners with IPv6 link-local multicast packets even when bridges are involved and our multicast optimizations enabled.
Signed-off-by: Linus Lüssing linus.luessing@web.de
Changes in v3:
- Removed "RFC" tag in title again: The stubs and new export are upstream in net-next and therefore going to be included in 3.17
- Added some debug output:
(a third debugging facility, a new table for debugfs for a global mcast flag overview will be added in a separate patch later as discussed with Simon)
- Two warning messages: -> Old kernel version or no bridge IGMP/MLD snooping compiled
- New batman-adv log-level "mcast": -> Logging mcast flag changes
I've tested the previous version (PATCH RFC v2), but since the changes are minimal you can add for this patch:
Tested-by: Simon Wunderlich sw@simonwunderlich.de
The test included 3 hosts bridged together
host1 ---[LAN]--- host2 ---[Mesh]--- host 3
with the recent net-next kernel and patches as sent by Linus previously. I was using his listener tool [1] which creates a multicast socket on the bridged-in host 1, and enabled the multicast querier [2] on host2 or host3 (only one at a time). Then I could verify that the desired multicast MAC address showed up in batctl tl on host 2, so the announcement, snooping and list retrieval of batman-adv for the multicast address worked correctly. Also the "bridge" tool of iproute2 proved useful, "bridge mdb show" gives us the list of snooped multicast listeners on the bridge.
Linus, please don't forget the batctl patch since you've added a loglevel here. I'm also looking forward to the debugfs files patch, which would make monitoring the status of the multicast operation a lot easier. :)
Cheers, Simon
[1] https://github.com/T-X/sm-listener [2] echo 1 > /sys/class/net/br0/bridge/multicast_querier