From: Jo-Philipp Wich Date: Fri, 16 Jan 2015 20:10:32 +0000 (+0100) Subject: luci-app-olsr: add workaround for finding default gw with policy routing X-Git-Url: http://git.archive.openwrt.org/?a=commitdiff_plain;h=9d908ffd78111f2f9d660b9a063e38af72554c57;p=project%2Fluci.git luci-app-olsr: add workaround for finding default gw with policy routing Signed-off-by: Jo-Philipp Wich --- 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