* [B.A.T.M.A.N.] [PATCH] batman-adv: send GW_DEL event in case of soft-iface destruction
@ 2013-08-19 16:39 Antonio Quartulli
2013-09-24 16:17 ` Marek Lindner
0 siblings, 1 reply; 2+ messages in thread
From: Antonio Quartulli @ 2013-08-19 16:39 UTC (permalink / raw)
To: b.a.t.m.a.n; +Cc: Antonio Quartulli
From: Antonio Quartulli <antonio@open-mesh.com>
In case of soft_iface destruction send a GW DEL event to
userspace so that applications which are listening for GW
events are informed about the lost of connectivity and can
react accordingly.
Signed-off-by: Antonio Quartulli <antonio@open-mesh.com>
---
hard-interface.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/hard-interface.c b/hard-interface.c
index c5f871f..8a42745 100644
--- a/hard-interface.c
+++ b/hard-interface.c
@@ -28,6 +28,7 @@
#include "originator.h"
#include "hash.h"
#include "bridge_loop_avoidance.h"
+#include "gateway_client.h"
#include <linux/if_arp.h>
#include <linux/if_ether.h>
@@ -524,8 +525,12 @@ void batadv_hardif_disable_interface(struct batadv_hard_iface *hard_iface,
dev_put(hard_iface->soft_iface);
/* nobody uses this interface anymore */
- if (!bat_priv->num_ifaces && autodel == BATADV_IF_CLEANUP_AUTO)
- batadv_softif_destroy_sysfs(hard_iface->soft_iface);
+ if (!bat_priv->num_ifaces) {
+ batadv_gw_check_client_stop(bat_priv);
+
+ if (autodel == BATADV_IF_CLEANUP_AUTO)
+ batadv_softif_destroy_sysfs(hard_iface->soft_iface);
+ }
netdev_upper_dev_unlink(hard_iface->net_dev, hard_iface->soft_iface);
hard_iface->soft_iface = NULL;
--
1.8.1.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [B.A.T.M.A.N.] [PATCH] batman-adv: send GW_DEL event in case of soft-iface destruction
2013-08-19 16:39 [B.A.T.M.A.N.] [PATCH] batman-adv: send GW_DEL event in case of soft-iface destruction Antonio Quartulli
@ 2013-09-24 16:17 ` Marek Lindner
0 siblings, 0 replies; 2+ messages in thread
From: Marek Lindner @ 2013-09-24 16:17 UTC (permalink / raw)
To: b.a.t.m.a.n; +Cc: Antonio Quartulli, Antonio Quartulli
On Monday 19 August 2013 18:39:59 Antonio Quartulli wrote:
> From: Antonio Quartulli <antonio@open-mesh.com>
>
> In case of soft_iface destruction send a GW DEL event to
> userspace so that applications which are listening for GW
> events are informed about the lost of connectivity and can
> react accordingly.
>
> Signed-off-by: Antonio Quartulli <antonio@open-mesh.com>
> ---
> hard-interface.c | 9 +++++++--
> 1 file changed, 7 insertions(+), 2 deletions(-)
Applied in revision e65bb36.
Thanks,
Marek
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-09-24 16:17 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-19 16:39 [B.A.T.M.A.N.] [PATCH] batman-adv: send GW_DEL event in case of soft-iface destruction Antonio Quartulli
2013-09-24 16:17 ` Marek Lindner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox