luci-app-olsr: add workaround for finding default gw with policy routing
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
This commit is contained in:
parent
bba6454b8f
commit
9d908ffd78
1 changed files with 4 additions and 0 deletions
|
@ -115,6 +115,10 @@ function action_neigh(json)
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
if not defaultgw then
|
||||||
|
defaultgw = luci.util.exec("ip route list exact 0.0.0.0/0 table all"):match(" via (%S+)")
|
||||||
|
end
|
||||||
|
|
||||||
local function compare(a,b)
|
local function compare(a,b)
|
||||||
if a.proto == b.proto then
|
if a.proto == b.proto then
|
||||||
return a.linkCost < b.linkCost
|
return a.linkCost < b.linkCost
|
||||||
|
|
Loading…
Reference in a new issue