1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-feeds.git synced 2025-03-09 15:40:03 +00:00

Change MPTCP status only if interface have IP

This commit is contained in:
Ycarus (Yannick Chabanois) 2024-05-03 18:15:20 +02:00
parent 08e9d8b4ff
commit 4e0b53431d

View file

@ -418,7 +418,7 @@ interface_multipath_settings() {
fi
fi
if [ "$(uci -q get openmptcprouter.settings.force_multipath)" != "0" ]; then
if [ "$(uci -q get openmptcprouter.settings.force_multipath)" != "0" ] && [ -n "$(ip a show dev $iface | grep inet)" ]; then
if ([ "$mode" = "master" ] || [ "$mode" = "on" ]) && [ -z "$(multipath $iface | grep default)" ]; then
logger -t "MPTCP" "Set $iface to $mode from $(multipath $iface)"
multipath "$iface" "on"