On Sunday, 26 May 2019 18:48:28 CEST Linus Lüssing wrote:
If a multicast router is detected then this is signalized via the new BATADV_MCAST_WANT_ALL_RTR4 and BATADV_MCAST_WANT_ALL_RTR6 multicast tvlv flags (which are sent flipped over the wire for backwards compatibility - so that old nodes will always have them "set").
[...]
@@ -691,7 +868,12 @@ batadv_mcast_mla_flags_update(struct batadv_priv
*bat_priv,
batadv_mcast_bridge_log(bat_priv, flags); batadv_mcast_flags_log(bat_priv, flags->tvlv_flags);
/* toggle WANT_ALL_RTR flags as they are sent flipped on the
* wire for backwards compatibility
*/ mcast_data.flags = flags->tvlv_flags;
mcast_data.flags ^= BATADV_MCAST_WANT_ALL_RTR4;
mcast_data.flags ^= BATADV_MCAST_WANT_ALL_RTR6; memset(mcast_data.reserved, 0, sizeof(mcast_data.reserved));
Ehrm, this sounds like it is a good way to confuse people. Have a packet field which is called BATADV_MCAST_WANT_ALL_RTR4 but it actually means that it doesn't have BATADV_MCAST_WANT_ALL_RTR4. So maybe we should call this differently in batadv_packet.h's enum batadv_mcast_flags. BATADV_MCAST_WANT_ALL_RTR4 -> BATADV_MCAST_WANT_NO_RTR4? And then switch the logic in batadv_mcast_mla_rtr_flags_softif_get_ipv*, batadv_mcast_mla_rtr_flags_bridge_get, batadv_mcast_mla_rtr_flags_bridge_get, batadv_mcast_mla_softif_get_ipv*, ....
Or is it really necessary to have this enabled for older nodes?
Kind regards, Sven