On Wednesday 18 June 2014 00:24:14 Linus Lüssing wrote:
A batman-adv node needs to know on/behind which other batman-adv node a multicast listener exists to be able to know where it needs to forward multicast packets to. A multicast listener can either sit on bat0, on a bridge on top of bat0. Or in this case, that's what "mla_bridge_get" is for, behind the bridge.
We usually don't have direct access to the kernel of weird Windows machines behind a bridge. Luckily a protocol, Multicast Listener Discovery, exists to detect such multicast listeners.
The bridge code has multicast snooping already, so it already memorizes what multicast listeners it has behind it's bridge. That's what we are fetching here. To add these to our local TT to announce them through the mesh.
Thanks for the clarifications but that does not address my question. To be more precise: In batadv_mcast_mla_update() your code is calling batadv_mcast_mla_softif_get() which queries the bridge interface (if bridged). A couple of lines later batadv_mcast_mla_bridge_get() is called (if bridged). It looks to me the code queries the bridge twice ?
Then, I am comparing the kernel doc to get the difference but I see none:
* batadv_mcast_mla_softif_get - get softif multicast listeners * @dev: the device to collect multicast addresses from * @mcast_list: a list to put found addresses into * * Collect multicast addresses of the local multicast listeners * on the given soft interface, dev, in the given mcast_list. * * If there is a bridge interface on top of dev, collect from that one * instead.
===============================================================
* batadv_mcast_mla_bridge_get - get bridged-in multicast listeners * @dev: a bridge slave whose bridge to collect multicast addresses from * @mcast_list: a list to put found addresses into * * Collects multicast addresses of the bridged-in multicast listeners * from the bridge on top of the given soft interface, dev, in the * given mcast_list.
What is the difference between these calls and why doesn't the code explain that difference ?
Cheers, Marek