diff options
author | Antonio Quartulli <antonio@open-mesh.com> | 2013-11-04 23:59:40 +0400 |
---|---|---|
committer | Antonio Quartulli <antonio@meshcoding.com> | 2014-01-08 23:49:40 +0400 |
commit | f3163181573f3dea264c5ffd578c187aef898bbb (patch) | |
tree | e53a9df449acf710a11a8fcaeb5804ddf6fd062e /net/batman-adv/gateway_client.c | |
parent | ebf38fb7ab18ba60460bbd03de760ad5a2f435eb (diff) | |
download | linux-f3163181573f3dea264c5ffd578c187aef898bbb.tar.xz |
batman-adv: deselect current GW on client mode switch off
When switching from gw_mode client to either off or server
the current selected gateway has to be deselected.
In this way when client mode is enabled again a gateway
re-election is forced and a GW_ADD event is consequently
sent.
The current behaviour instead is to keep the current gateway
leading to no GW_ADD event when gw_mode client is selected
for a second time
Signed-off-by: Antonio Quartulli <antonio@open-mesh.com>
Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch>
Signed-off-by: Antonio Quartulli <antonio@meshcoding.com>
Diffstat (limited to 'net/batman-adv/gateway_client.c')
-rw-r--r-- | net/batman-adv/gateway_client.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/net/batman-adv/gateway_client.c b/net/batman-adv/gateway_client.c index 356417379e96..53a900952282 100644 --- a/net/batman-adv/gateway_client.c +++ b/net/batman-adv/gateway_client.c @@ -205,6 +205,11 @@ void batadv_gw_check_client_stop(struct batadv_priv *bat_priv) if (!curr_gw) return; + /* deselect the current gateway so that next time that client mode is + * enabled a proper GW_ADD event can be sent + */ + batadv_gw_select(bat_priv, NULL); + /* if batman-adv is switching the gw client mode off and a gateway was * already selected, send a DEL uevent */ |