From: Florian Eckert Date: Fri, 17 Mar 2017 10:06:24 +0000 (+0100) Subject: net/mwan3: fix hotplug on ACTION ifdown X-Git-Url: http://git.99rst.org/?a=commitdiff_plain;h=28c8b664e471df9adbba5f2b8598b4e95ae36f4b;p=openwrt-packages.git 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 --- 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})"