Start to send originator messages when interface gets active
Commit Message
The module gets in a inactive state when all interfaces are down. This
stops the sending of new packets. When a interface gets activated again
it must reactivate the module and then start the sending of new
originator messages.
Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de>
---
batman-adv-kernelland/hard-interface.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
@@ -425,6 +425,13 @@ static int hard_if_event(struct notifier_block *this,
break;
case NETDEV_UP:
hardif_activate_interface(batman_if);
+ if ((atomic_read(&module_state) == MODULE_INACTIVE) &&
+ (hardif_get_active_if_num() > 0)) {
+ activate_module();
+
+ /* begin sending originator messages on that interface */
+ schedule_own_packet(batman_if);
+ }
break;
/* NETDEV_CHANGEADDR - mac address change - what are we doing here ? */
default: