summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Eckert <fe@dev.tdt.de>2017-03-17 11:06:24 +0100
committerFlorian Eckert <fe@dev.tdt.de>2017-08-17 11:25:30 +0200
commiteefc65b014c35441df73b17a8a3ff9c898d9628a (patch)
tree02eba77ee9a165eae2460a133663f7a4491cd186
parent7fb33ad6b656855bdeeacb561ba313a951801bcb (diff)
net/mwan3: fix hotplug on ACTION ifdown
On dynamic interface proto (dhcp/pppoe) the hotplug will not execude (exit 9) because the gateway is already released. The check will now only be made on a ifup ACTION event. Signed-off-by: Florian Eckert <fe@dev.tdt.de> (cherry picked from commit 28c8b664e471df9adbba5f2b8598b4e95ae36f4b)
-rw-r--r--net/mwan3/files/etc/hotplug.d/iface/15-mwan34
1 files changed, 3 insertions, 1 deletions
diff --git a/net/mwan3/files/etc/hotplug.d/iface/15-mwan3 b/net/mwan3/files/etc/hotplug.d/iface/15-mwan3
index 86e60e133..045a481c8 100644
--- a/net/mwan3/files/etc/hotplug.d/iface/15-mwan3
+++ b/net/mwan3/files/etc/hotplug.d/iface/15-mwan3
@@ -30,7 +30,9 @@ elif [ "$family" == "ipv6" ]; then
network_get_gateway6 gateway $INTERFACE
fi
-[ -n "$gateway" ] || exit 9
+if [ "$ACTION" == "ifup" ]; then
+ [ -n "$gateway" ] || exit 9
+fi
$LOG notice "$ACTION interface $INTERFACE (${DEVICE:-unknown})"