summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-app-olsr/luasrc/controller/olsr.lua
diff options
context:
space:
mode:
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 4573f690b5..3615372909 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