1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-feeds.git synced 2025-03-09 15:40:03 +00:00
This commit is contained in:
suyuan 2023-12-16 18:58:20 +08:00 committed by GitHub
commit c722aeb2bb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 68 additions and 22 deletions

View file

@ -10,6 +10,7 @@ if [ "$ACTION" = ifup -o "$ACTION" = ifupdate -o "$ACTION" = iflink ] && [ -z "$
logger -t "mptcp" "Reloading mptcp config due to $ACTION of $INTERFACE ($DEVICE)"
/etc/init.d/mptcp reload "$DEVICE" >/dev/null || exit 0
else
logger -t "mptcp" "Set multipath off on $DEVICE ($INTERFACE) due to $ACTION"
multipath $DEVICE off 2>&1 >/dev/null
fi

View file

@ -206,8 +206,9 @@ interface_multipath_settings() {
#echo "îface: $iface"
if [ "$(uci -q get openmptcprouter.settings.force_multipath)" != "0" ]; then
_logger -t "MPTCP" "Set $iface to $mode"
if [ "$mode" = "master" ]; then
multipath "$iface" "on"
multipath "$iface" "on"
else
multipath "$iface" "$mode"
fi
@ -428,7 +429,8 @@ set_multipath() {
exist=1
fi
done
[ "$exist" = "0" ] && {
[ "$exist" = "0" ] && [ -z "$(multipath $iface | grep deactivated)" ] && {
logger -t "MPTCP" "Disabling MPTCP on interface $iface not found in enabled multipath list"
multipath $iface off
}
done

View file

@ -1246,7 +1246,7 @@ fi
_log "Reload MPTCP config for $OMR_TRACKER_DEVICE"
/etc/init.d/mptcp reload "$OMR_TRACKER_DEVICE"
fi
_log "Multipath $OMR_TRACKER_DEVICE switched to $multipath_config (from $multipath_status)"
_log "Multipath $OMR_TRACKER_DEVICE ($OMR_TRACKER_INTERFACE) switched to $multipath_config (from $multipath_status)"
multipath "$OMR_TRACKER_DEVICE" "$multipath_config"
fi
}