mwan3: reload unreachable/blackhole rules on hotplug
authorAaron Goodman <aaronjg@stanford.edu>
Thu, 5 Nov 2020 03:06:17 +0000 (22:06 -0500)
committerFlorian Eckert <fe@dev.tdt.de>
Fri, 6 Nov 2020 09:40:54 +0000 (10:40 +0100)
when the network procd service restarts, it flushes the ip rules. We
need to add these rules back. Since hotplug events are triggered when
the networks come back online, adding this call to the hotplug script
is the most convenient place to refresh the rules.

Signed-off-by: Aaron Goodman <aaronjg@stanford.edu>
net/mwan3/files/etc/hotplug.d/iface/15-mwan3

index 20fee845a138f782d9a029b59927fdfcb1dfda1d..5c60128d4261faf0aa311988bdf0f6158b77f6ae 100644 (file)
@@ -74,6 +74,7 @@ case "$ACTION" in
                mwan3_set_iface_hotplug_state $INTERFACE "$status"
                if [ "$MWAN3_STARTUP" != 1 ]; then
                        mwan3_create_iface_route $INTERFACE $DEVICE
+                       mwan3_set_general_rules
                        [ "$status" = "online" ] && mwan3_set_policies_iptables
                fi
                [ "$ACTION" = ifup ] && procd_running mwan3 "track_$INTERFACE" && procd_send_signal mwan3 "track_$INTERFACE" USR2