summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-app-vpn-policy-routing/luasrc/model
diff options
context:
space:
mode:
authorStan Grishin <stangri@melmac.net>2020-01-02 21:14:18 -0700
committerStan Grishin <stangri@melmac.net>2020-01-02 21:14:18 -0700
commitde2e3411c2329e0283d86fc604d7a43f6fb206ef (patch)
tree42f81f151047ff0d1ead6885854b4694cb9ebb90 /applications/luci-app-vpn-policy-routing/luasrc/model
parent88c5269344f329f5f7a14c509fe8b1995c6d937f (diff)
luci-app-vpn-policy-routing: add note about default routing
Signed-off-by: Stan Grishin <stangri@melmac.net>
Diffstat (limited to 'applications/luci-app-vpn-policy-routing/luasrc/model')
-rw-r--r--applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua21
1 files changed, 8 insertions, 13 deletions
diff --git a/applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua b/applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua
index e6b1156eb3..95d42945eb 100644
--- a/applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua
+++ b/applications/luci-app-vpn-policy-routing/luasrc/model/cbi/vpn-policy-routing.lua
@@ -1,9 +1,4 @@
local readmeURL = "https://github.com/openwrt/packages/tree/master/net/vpn-policy-routing/files/README.md"
--- local readmeURL = "https://github.com/stangri/openwrt_packages/tree/master/vpn-policy-routing/files/README.md"
-
--- function log(obj)
--- if obj ~= nil then if type(obj) == "table" then luci.util.dumptable(obj) else luci.util.perror(obj) end else luci.util.perror("Empty object") end
--- end
local packageName = "vpn-policy-routing"
local uci = require "luci.model.uci".cursor()
@@ -73,13 +68,13 @@ end
local lanIPAddr = uci:get("network", "lan", "ipaddr")
local lanNetmask = uci:get("network", "lan", "netmask")
-- if multiple ip addresses on lan interface, will be return as table of CIDR notations i.e. {"10.0.0.1/24","10.0.0.2/24"}
-if (type(lanIPAddr) == "table") then
- first = true
- for i,line in ipairs(lanIPAddr) do
- lanIPAddr = lanIPAddr[i]
- break
- end
- lanIPAddr = string.match(lanIPAddr,"[0-9.]+")
+if (type(lanIPAddr) == "table") then
+ first = true
+ for i,line in ipairs(lanIPAddr) do
+ lanIPAddr = lanIPAddr[i]
+ break
+ end
+ lanIPAddr = string.match(lanIPAddr,"[0-9.]+")
end
if lanIPAddr and lanNetmask then
laPlaceholder = ip.new(lanIPAddr .. "/" .. lanNetmask )
@@ -125,7 +120,7 @@ status.template = "vpn-policy-routing/status"
status.value = pkgStatusLabel
if pkgStatus:match("Running") and pkgGateways and pkgGateways ~= "" then
gateways = h:option(DummyValue, "_dummy", translate("Service Gateways"))
- gateways.template = packageName .. "/status-textarea"
+ gateways.template = packageName .. "/status-gateways"
gateways.value = pkgGateways
end
if pkgErrors and pkgErrors ~= "" then