diff --git a/mptcp/files/etc/hotplug.d/iface/30-mptcp b/mptcp/files/etc/hotplug.d/iface/30-mptcp index 33bc70ebe2..c01ab8f359 100644 --- a/mptcp/files/etc/hotplug.d/iface/30-mptcp +++ b/mptcp/files/etc/hotplug.d/iface/30-mptcp @@ -6,11 +6,10 @@ /etc/init.d/mptcp enabled || exit 0 -#if [ "$ACTION" = ifup -o "$ACTION" = ifupdate -o "$ACTION" = iflink ] && [ -z "$(echo $DEVICE | grep oip | grep gre)" ]; then -# logger -t "mptcp" "Reloading mptcp config due to $ACTION of $INTERFACE ($DEVICE)" -# /etc/init.d/mptcp reload "$DEVICE" >/dev/null || exit 0 -#else -if [ "$ACTION" = ifdown ]; then +if [ "$ACTION" = ifup -o "$ACTION" = ifupdate -o "$ACTION" = iflink ] && [ -z "$(echo $DEVICE | grep oip | grep gre)" ]; then + logger -t "mptcp" "Reloading mptcp config due to $ACTION of $INTERFACE ($DEVICE)" + /etc/init.d/mptcp reload "$DEVICE" >/dev/null || exit 0 +elif [ "$ACTION" = ifdown ]; then multipath $DEVICE off 2>&1 >/dev/null fi