summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
a429bb4)
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
-- Licensed to the public under the GNU General Public License v2.
local dsp = require "luci.dispatcher"
-- Licensed to the public under the GNU General Public License v2.
local dsp = require "luci.dispatcher"
+local util = require("luci.util")
local m, mwan_rule, src_ip, src_port, dest_ip, dest_port, proto, sticky
local timeout, ipset, logging, policy
arg[1] = arg[1] or ""
local m, mwan_rule, src_ip, src_port, dest_ip, dest_port, proto, sticky
local timeout, ipset, logging, policy
arg[1] = arg[1] or ""
+local ipsets = util.split(util.trim(util.exec("ipset -n -L 2>/dev/null | grep -v mwan3_ | sort")), "\n", nil, true) or {}
+
m = Map("mwan3", translatef("MWAN Rule Configuration - %s", arg[1]))
m.redirect = dsp.build_url("admin", "network", "mwan", "rule")
m = Map("mwan3", translatef("MWAN Rule Configuration - %s", arg[1]))
m.redirect = dsp.build_url("admin", "network", "mwan", "rule")
ipset = mwan_rule:option(Value, "ipset", translate("IPset"),
translate("Name of IPset rule. Requires IPset rule in /etc/dnsmasq.conf (eg \"ipset=/youtube.com/youtube\")"))
ipset = mwan_rule:option(Value, "ipset", translate("IPset"),
translate("Name of IPset rule. Requires IPset rule in /etc/dnsmasq.conf (eg \"ipset=/youtube.com/youtube\")"))
+for _, z in ipairs(ipsets) do
+ ipset:value(z)
+end
logging = mwan_rule:option(Flag, "logging", translate("Logging"),
translate("Enables firewall rule logging (global mwan3 logging must also be enabled)"))
logging = mwan_rule:option(Flag, "logging", translate("Logging"),
translate("Enables firewall rule logging (global mwan3 logging must also be enabled)"))