2018-01-23 12:12:53 +00:00
|
|
|
-- Copyright 2017 Florian Eckert <fe@dev.tdt.de>
|
|
|
|
-- Licensed to the public under the GNU General Public License v2.
|
2017-08-11 06:53:00 +00:00
|
|
|
|
|
|
|
local net = require "luci.model.network".init()
|
|
|
|
|
2018-01-18 06:26:27 +00:00
|
|
|
|
2018-01-12 09:50:58 +00:00
|
|
|
m = Map("mwan3", translate("MWAN - Globals"))
|
2017-08-11 06:53:00 +00:00
|
|
|
|
2018-01-12 09:50:58 +00:00
|
|
|
s = m:section(NamedSection, "globals", "globals", nil)
|
2017-08-11 06:53:00 +00:00
|
|
|
n = s:option(ListValue, "local_source",
|
|
|
|
translate("Local source interface"),
|
2018-01-18 06:26:27 +00:00
|
|
|
translate("Use the IP address of this interface as source IP " ..
|
|
|
|
"address for traffic initiated by the router itself"))
|
2017-08-11 06:53:00 +00:00
|
|
|
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
|
|
|
|
|
2017-08-14 08:08:28 +00:00
|
|
|
mask = s:option(
|
|
|
|
Value,
|
|
|
|
"mmx_mask",
|
|
|
|
translate("Firewall mask"),
|
|
|
|
translate("Enter value in hex, starting with <code>0x</code>"))
|
|
|
|
mask.datatype = "hex(4)"
|
|
|
|
mask.default = "0xff00"
|
|
|
|
|
2017-08-11 06:53:00 +00:00
|
|
|
return m
|