The following commit has been merged in the next branch: commit 8c379dc6552f57a56f9d1d02e8b45e167933a55c Author: Marek Lindner lindner_marek@yahoo.de Date: Mon Jul 23 14:59:13 2012 +0200
batman-adv: select an internet gateway if none was chosen
This is a regression introduced by: 6a17ecc4603be7f065c38b288d038a0082bbf21d
Reported-by: Nicolás Echániz nicoechaniz@codigosur.org Signed-off-by: Marek Lindner lindner_marek@yahoo.de Acked-by: Antonio Quartulli ordex@autistici.org
diff --git a/gateway_client.c b/gateway_client.c index b421cc4..fc866f2 100644 --- a/gateway_client.c +++ b/gateway_client.c @@ -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)