net/mwan3: registrate SIGUSR1 trap on interface down event

If interface is getting down by netifd (unplug ethernet cable)
mwan3track will not recognize this change. It will also generate an
additional down event when he notice does his tracking interface is offline.

Mwan3track will now be informed by a signal (trap) USR1 during down event
that the interface is already down. An additional down event will not be
generated.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
This commit is contained in:
Florian Eckert
2017-04-06 15:41:05 +02:00
parent 84df06e0dc
commit b216fd3642
3 changed files with 34 additions and 0 deletions
@@ -64,6 +64,7 @@ case "$ACTION" in
mwan3_delete_iface_iptables $INTERFACE
mwan3_delete_iface_route $INTERFACE
mwan3_delete_iface_ipset_entries $INTERFACE
mwan3_track_signal $INTERFACE $DEVICE
mwan3_set_policies_iptables
mwan3_set_user_rules
mwan3_flush_conntrack $INTERFACE $DEVICE "ifdown"