summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-app-olsr/luasrc/controller/olsr.lua
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2015-01-16 21:10:32 +0100
committerJo-Philipp Wich <jow@openwrt.org>2015-01-16 21:40:49 +0100
commit9d908ffd78111f2f9d660b9a063e38af72554c57 (patch)
tree649246f6ed3e8e3ccccdd2757e9c48b64ba1c665 /applications/luci-app-olsr/luasrc/controller/olsr.lua
parentbba6454b8f781e8406b18d67c4d760e96730ea90 (diff)
luci-app-olsr: add workaround for finding default gw with policy routing
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
Diffstat (limited to 'applications/luci-app-olsr/luasrc/controller/olsr.lua')
-rw-r--r--applications/luci-app-olsr/luasrc/controller/olsr.lua4
1 files changed, 4 insertions, 0 deletions
diff --git a/applications/luci-app-olsr/luasrc/controller/olsr.lua b/applications/luci-app-olsr/luasrc/controller/olsr.lua
index 4573f690b..361537290 100644
--- a/applications/luci-app-olsr/luasrc/controller/olsr.lua
+++ b/applications/luci-app-olsr/luasrc/controller/olsr.lua
@@ -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