Commit caa0bf64 authored by Marek Lindner's avatar Marek Lindner Committed by David S. Miller

batman-adv: select an internet gateway if none was chosen

This is a regression introduced by: 2265c141
("batman-adv: gateway election code refactoring")
Reported-by: default avatarNicolás Echániz <nicoechaniz@codigosur.org>
Signed-off-by: default avatarMarek Lindner <lindner_marek@yahoo.de>
Acked-by: default avatarAntonio Quartulli <ordex@autistici.org>
Signed-off-by: default avatarAntonio Quartulli <ordex@autistici.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 25099335
......@@ -200,11 +200,11 @@ void batadv_gw_election(struct batadv_priv *bat_priv)
if (atomic_read(&bat_priv->gw_mode) != BATADV_GW_MODE_CLIENT)
goto out;
if (!batadv_atomic_dec_not_zero(&bat_priv->gw_reselect))
goto out;
curr_gw = batadv_gw_get_selected_gw_node(bat_priv);
if (!batadv_atomic_dec_not_zero(&bat_priv->gw_reselect) && curr_gw)
goto out;
next_gw = batadv_gw_get_best_gw_node(bat_priv);
if (curr_gw == next_gw)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment