mirror of https://github.com/hak5/openwrt-owl.git
base-files: only consider enabled default routes when finding the wan iface (#11774)
SVN-Revision: 32525owl
parent
1f8d8dca76
commit
e654014352
|
@ -49,6 +49,7 @@ __network_gateway()
|
||||||
|
|
||||||
local __tmp="$(ubus call network.interface."$__iface" status 2>/dev/null)"
|
local __tmp="$(ubus call network.interface."$__iface" status 2>/dev/null)"
|
||||||
local __idx=1
|
local __idx=1
|
||||||
|
local __enabled
|
||||||
|
|
||||||
json_load "${__tmp:-{}}"
|
json_load "${__tmp:-{}}"
|
||||||
|
|
||||||
|
@ -60,9 +61,10 @@ __network_gateway()
|
||||||
|
|
||||||
json_select "$((__idx++))"
|
json_select "$((__idx++))"
|
||||||
json_get_var __tmp target
|
json_get_var __tmp target
|
||||||
|
json_get_var __enabled enabled
|
||||||
|
|
||||||
case "${__family}/${__tmp}" in
|
case "${__enabled}/${__family}/${__tmp}" in
|
||||||
4/0.0.0.0|6/::)
|
1/4/0.0.0.0|1/6/::)
|
||||||
json_get_var "$__var" nexthop
|
json_get_var "$__var" nexthop
|
||||||
return $?
|
return $?
|
||||||
;;
|
;;
|
||||||
|
|
Loading…
Reference in New Issue