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(-)
diff --git a/batman-adv-kernelland/hard-interface.c b/batman-adv-kernelland/hard-interface.c index f04d2db..f954f4e 100644 --- a/batman-adv-kernelland/hard-interface.c +++ b/batman-adv-kernelland/hard-interface.c @@ -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: