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:
parent
b482cd1dbd
commit
0d501819a4
1 changed files with 6 additions and 0 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue