diff options
author | Antonio Quartulli <antonio@open-mesh.com> | 2013-07-13 00:06:00 +0200 |
---|---|---|
committer | Antonio Quartulli <ordex@autistici.org> | 2013-08-28 11:33:00 +0200 |
commit | c6eaa3f067d6f9fa55fd9645e93ed79411bebdaf (patch) | |
tree | e5d5136abe4c857cae4b04985c22c38ccbeaca71 /net/batman-adv/sysfs.c | |
parent | c00a072d3fec446d763e68b50f6f6cfd9e2957e2 (diff) | |
download | linux-c6eaa3f067d6f9fa55fd9645e93ed79411bebdaf.tar.bz2 |
batman-adv: send GW_DEL event when the gw client mode is deselected
Whenever the GW client mode is deselected, a DEL event has
to be sent in order to tell userspace that the current
gateway has been lost. Send the uevent on state change only
if a gateway was currently selected.
Reported-by: Marek Lindner <lindner_marek@yahoo.de>
Signed-off-by: Antonio Quartulli <antonio@open-mesh.com>
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Diffstat (limited to 'net/batman-adv/sysfs.c')
-rw-r--r-- | net/batman-adv/sysfs.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/net/batman-adv/sysfs.c b/net/batman-adv/sysfs.c index 929e304dacb2..4114b961bc2c 100644 --- a/net/batman-adv/sysfs.c +++ b/net/batman-adv/sysfs.c @@ -385,6 +385,10 @@ static ssize_t batadv_store_gw_mode(struct kobject *kobj, curr_gw_mode_str, buff); batadv_gw_deselect(bat_priv); + /* always call batadv_gw_check_client_stop() before changing the gateway + * state + */ + batadv_gw_check_client_stop(bat_priv); atomic_set(&bat_priv->gw_mode, (unsigned int)gw_mode_tmp); return count; } |