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

Change MPTCP status only if interface have IP (#481)

This commit is contained in:
suyuan 2024-05-04 11:01:47 +08:00 committed by GitHub
commit d0a6a99593
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

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"