mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
Support interfaces where ifname is not defined in config
This commit is contained in:
parent
de107813d1
commit
9919f87f20
4 changed files with 14 additions and 0 deletions
|
@ -38,6 +38,7 @@ interface_multipath_settings() {
|
|||
local intf="$2"
|
||||
|
||||
config_get iface "$config" ifname
|
||||
[ -z "$iface"] && iface=$(ifstatus "$config" | jsonfilter -e '@["l3_device"]')
|
||||
count=$(($count+1))
|
||||
id=$count
|
||||
[ -n "$intf" ] && [ "$iface" != "$intf" ] && return 0
|
||||
|
|
|
@ -7,6 +7,7 @@ set_route() {
|
|||
PREVINTERFACE=$2
|
||||
multipath_config=$(uci -q get network.$INTERFACE.multipath || echo "off")
|
||||
interface_if=$(uci -q get network.$INTERFACE.ifname)
|
||||
[ -z "$interface_if" ] && interface_if=$(ifstatus "$INTERFACE" | jsonfilter -e '@["l3_device"]')
|
||||
multipath_current_config=$(multipath $interface_if | grep deactivated)
|
||||
if [ "$multipath_config" != "off" ] && [ "$SETROUTE" != true ] && [ "$INTERFACE" != "$PREVINTERFACE" ] && [ "$multipath_current_config" = "" ]; then
|
||||
#if [ "$multipath_config" != "off" ] && [ "$SETROUTE" != true ]; then
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue