git.99rst.org
/
openwrt-luci.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
| inline |
side by side
(parent:
bba6454
)
luci-app-olsr: add workaround for finding default gw with policy routing
author
Jo-Philipp Wich
<redacted>
Fri, 16 Jan 2015 20:10:32 +0000
(21:10 +0100)
committer
Jo-Philipp Wich
<redacted>
Fri, 16 Jan 2015 20:40:49 +0000
(21:40 +0100)
Signed-off-by: Jo-Philipp Wich <redacted>
applications/luci-app-olsr/luasrc/controller/olsr.lua
patch
|
blob
|
history
diff --git
a/applications/luci-app-olsr/luasrc/controller/olsr.lua
b/applications/luci-app-olsr/luasrc/controller/olsr.lua
index 4573f690b598142c152eaacfafb3a10dee8f7b47..3615372909f3243e3e6efe2e949455b554563556 100644
(file)
--- 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
git clone https://git.99rst.org/PROJECT