mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
Always use device in priority
This commit is contained in:
parent
8aa3927d7c
commit
ae8371b2cc
5 changed files with 14 additions and 10 deletions
|
@ -85,9 +85,9 @@ interface_multipath_settings() {
|
|||
local enabled
|
||||
|
||||
config_get enabled "$config" auto "1"
|
||||
config_get iface "$config" ifname
|
||||
iface=$(ifstatus "$config" | jsonfilter -q -e '@["l3_device"]')
|
||||
[ -z "$iface" ] && config_get iface "$config" ifname
|
||||
config_get txqueuelen "$config" txqueuelen
|
||||
[ -z "$iface" ] && iface=$(ifstatus "$config" | jsonfilter -q -e '@["l3_device"]')
|
||||
[ -n "$(echo $iface | grep '@')" ] && iface=$(ifstatus "$config" | jsonfilter -q -e '@["device"]')
|
||||
if [ "$(uci -q get openmptcprouter.${config}.metric)" = "" ]; then
|
||||
count=$((count+1))
|
||||
|
@ -349,7 +349,8 @@ interface_multipath_settings() {
|
|||
}
|
||||
|
||||
load_interfaces() {
|
||||
config_get ifname "$1" ifname
|
||||
ifname=$(ifstatus "$1" | jsonfilter -q -e '@["l3_device"]')
|
||||
[ -z "$ifname" ] && config_get ifname "$1" ifname
|
||||
config_get multipath "$1" multipath ""
|
||||
[ -z "$multipath" ] && multipath="$(uci -q get openmptcprouter.$1.multipath)"
|
||||
[ "$multipath" != "off" ] && [ "$multipath" != "" ] && interfaces=" ${ifname} ${interfaces}"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue