Skip to content

Commit

Permalink
batman-adv: select an internet gateway if none was chosen
Browse files Browse the repository at this point in the history
This is a regression introduced by: 2265c14
("batman-adv: gateway election code refactoring")

Reported-by: Nicolás Echániz <[email protected]>
Signed-off-by: Marek Lindner <[email protected]>
Acked-by: Antonio Quartulli <[email protected]>
Signed-off-by: Antonio Quartulli <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
Marek Lindner authored and davem330 committed Aug 6, 2012
1 parent 2509933 commit caa0bf6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions net/batman-adv/gateway_client.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit caa0bf6

Please sign in to comment.