From 28c8b664e471df9adbba5f2b8598b4e95ae36f4b Mon Sep 17 00:00:00 2001 From: Florian Eckert Date: Fri, 17 Mar 2017 11:06:24 +0100 Subject: [PATCH] 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 --- net/mwan3/files/etc/hotplug.d/iface/15-mwan3 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/net/mwan3/files/etc/hotplug.d/iface/15-mwan3 b/net/mwan3/files/etc/hotplug.d/iface/15-mwan3 index 7d6cd98c4..f5fbc0b92 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})"