Merge pull request #1561 from TDT-AG/pr/luci-app-mwan3-refactoring-continue
[project/luci.git] / applications / luci-app-mwan3 / luasrc / model / cbi / mwan / globalsconfig.lua
index 54d20bd..b53d288 100644 (file)
@@ -14,12 +14,14 @@ $Id$
 
 local net = require "luci.model.network".init()
 
-m = Map("mwan3")
 
-s = m:section(NamedSection, "globals", "globals", translate("Globals mwan3 options"))
+m = Map("mwan3", translate("MWAN - Globals"))
+
+s = m:section(NamedSection, "globals", "globals", nil)
 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"))
+       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
@@ -29,4 +31,12 @@ for _, net in ipairs(net:get_networks()) do
 end
 n.rmempty = false
 
+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"
+
 return m