diff options
author | Hannu Nyman <hannu.nyman@iki.fi> | 2017-08-11 16:16:33 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-08-11 16:16:33 +0300 |
commit | 8bc19716615e264474113af433ccc9bd9f3380ca (patch) | |
tree | faf947f95899ebf86638e7df36f7dd846e2e3598 /applications/luci-app-mwan3/luasrc/model/cbi/mwan/globalsconfig.lua | |
parent | afe2d2c18743b0f85efb030fb279c4e5ac169197 (diff) | |
parent | bcc9382e160407760a2b327b15494c3673819314 (diff) |
Merge pull request #1297 from TDT-GmbH/luci-app-mwan3_add_options
luci-app-mwan3: add new options
Diffstat (limited to 'applications/luci-app-mwan3/luasrc/model/cbi/mwan/globalsconfig.lua')
-rw-r--r-- | applications/luci-app-mwan3/luasrc/model/cbi/mwan/globalsconfig.lua | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/applications/luci-app-mwan3/luasrc/model/cbi/mwan/globalsconfig.lua b/applications/luci-app-mwan3/luasrc/model/cbi/mwan/globalsconfig.lua new file mode 100644 index 0000000000..54d20bdcb5 --- /dev/null +++ b/applications/luci-app-mwan3/luasrc/model/cbi/mwan/globalsconfig.lua @@ -0,0 +1,32 @@ +--[[ +LuCI - Lua Configuration Interface + +Copyright 2017 Florian Eckert <fe@dev.tdt.de> + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +$Id$ +]]-- + +local net = require "luci.model.network".init() + +m = Map("mwan3") + +s = m:section(NamedSection, "globals", "globals", translate("Globals mwan3 options")) +n = s:option(ListValue, "local_source", + translate("Local source interface"), + translate("Use the IP address of this interface as source IP address for traffic initiated by the router itself")) +n:value("none") +n.default = "none" +for _, net in ipairs(net:get_networks()) do + if net:name() ~= "loopback" then + n:value(net:name()) + end +end +n.rmempty = false + +return m |