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

Doesn't configure MPTCP if interface down

This commit is contained in:
Ycarus 2018-07-24 14:27:13 +02:00
parent b482cd1dbd
commit 0d501819a4

View file

@ -36,6 +36,10 @@ interface_multipath_settings() {
local mode iface
local config="$1"
local intf="$2"
local enabled
config_get enabled "$config" auto "1"
[ "$enabled" = "0" ] && return 0
config_get iface "$config" ifname
[ -z "$iface" ] && iface=$(ifstatus "$config" | jsonfilter -q -e '@["l3_device"]')
@ -87,6 +91,8 @@ interface_multipath_settings() {
ip route flush $id
config_get mode "$config" multipath "off"
local enabled
config_get enabled "$config" auto "1"
[ "$mode" = "master" ] && {
ip route replace default via $gateway dev $iface
}