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:
Jo-Philipp Wich 2015-01-16 21:10:32 +01:00
parent bba6454b8f
commit 9d908ffd78

View file

@ -115,6 +115,10 @@ function action_neigh(json)
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)
if a.proto == b.proto then
return a.linkCost < b.linkCost