* [PATCH net] batman-adv: select an internet gateway if none was chosen
@ 2012-08-04 14:13 Antonio Quartulli
[not found] ` <1344089606-9573-1-git-send-email-ordex-GaUfNO9RBHfsrOwW+9ziJQ@public.gmane.org>
0 siblings, 1 reply; 2+ messages in thread
From: Antonio Quartulli @ 2012-08-04 14:13 UTC (permalink / raw)
To: davem-fT/PcQaiUtIeIZ0/mPfg9Q
Cc: netdev-u79uwXL29TY76Z2rM5mHXA,
b.a.t.m.a.n-ZwoEplunGu2X36UT3dwllkB+6BGkLq7r, Marek Lindner
From: Marek Lindner <lindner_marek-LWAfsSFWpa4@public.gmane.org>
This is a regression introduced by: 2265c141086474bbae55a5bb3afa1ebb78ccaa7c
Reported-by: Nicolás Echániz <nicoechaniz-A9NS9UNFlhlrovVCs/uTlw@public.gmane.org>
Signed-off-by: Marek Lindner <lindner_marek-LWAfsSFWpa4@public.gmane.org>
Acked-by: Antonio Quartulli <ordex-GaUfNO9RBHfsrOwW+9ziJQ@public.gmane.org>
Signed-off-by: Antonio Quartulli <ordex-GaUfNO9RBHfsrOwW+9ziJQ@public.gmane.org>
---
net/batman-adv/gateway_client.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/net/batman-adv/gateway_client.c b/net/batman-adv/gateway_client.c
index b421cc4..fc866f2 100644
--- a/net/batman-adv/gateway_client.c
+++ b/net/batman-adv/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)
--
1.7.9.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net] batman-adv: select an internet gateway if none was chosen
[not found] ` <1344089606-9573-1-git-send-email-ordex-GaUfNO9RBHfsrOwW+9ziJQ@public.gmane.org>
@ 2012-08-06 20:28 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2012-08-06 20:28 UTC (permalink / raw)
To: ordex-GaUfNO9RBHfsrOwW+9ziJQ
Cc: netdev-u79uwXL29TY76Z2rM5mHXA,
b.a.t.m.a.n-ZwoEplunGu2X36UT3dwllkB+6BGkLq7r,
lindner_marek-LWAfsSFWpa4
From: Antonio Quartulli <ordex-GaUfNO9RBHfsrOwW+9ziJQ@public.gmane.org>
Date: Sat, 4 Aug 2012 16:13:26 +0200
> From: Marek Lindner <lindner_marek-LWAfsSFWpa4@public.gmane.org>
>
> This is a regression introduced by: 2265c141086474bbae55a5bb3afa1ebb78ccaa7c
>
> Reported-by: Nicolás Echániz <nicoechaniz-A9NS9UNFlhlrovVCs/uTlw@public.gmane.org>
> Signed-off-by: Marek Lindner <lindner_marek-LWAfsSFWpa4@public.gmane.org>
> Acked-by: Antonio Quartulli <ordex-GaUfNO9RBHfsrOwW+9ziJQ@public.gmane.org>
> Signed-off-by: Antonio Quartulli <ordex-GaUfNO9RBHfsrOwW+9ziJQ@public.gmane.org>
Applied.
Please, when referencing commits in a log message, provide the commit
header text ("LIKE THIS"). Otherwise in trees where the SHA1 IDs are
different, it will ambiguous what commit you are referencing.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-08-06 20:28 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-04 14:13 [PATCH net] batman-adv: select an internet gateway if none was chosen Antonio Quartulli
[not found] ` <1344089606-9573-1-git-send-email-ordex-GaUfNO9RBHfsrOwW+9ziJQ@public.gmane.org>
2012-08-06 20:28 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).