Project

General

Profile

Bug #326

Updated by Sven Eckelmann over 4 years ago

It looks like the code in 80b2d47be2c7 ("batman-adv: B.A.T.M.A.N. V - implement GW selection logic") unconditionally overwrites the BATMAN_IV gw selection class value with 50 when it was enabled during compile-time. is compiled.

Problem is that this change of the gw selection class is done in batadv_v_mesh_init:

<pre>
@@ -397,7 +609,16 @@ void batadv_v_hardif_init(struct batadv_hard_iface *hard_iface)
*/
int batadv_v_mesh_init(struct batadv_priv *bat_priv)
{
- return batadv_v_ogm_init(bat_priv);
+ int ret = 0;
+
+ ret = batadv_v_ogm_init(bat_priv);
+ if (ret < 0)
+ return ret;
+
+ /* set default throughput difference threshold to 5Mbps */
+ atomic_set(&bat_priv->gw.sel_class, 50);
+
+ return 0;
}

/**
</pre>

But batadv_v_mesh_init is called unconditionally in batadv_mesh_init and not only when BATMAN_V is selected as routing algorithm.

The original code (BATMAN_IV) is setting the in gw.sel_class in batadv_softif_init_late. This is a lot earlier than the batadv_mesh_init/batadv_v_mesh_init call.

Back