summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall
diff options
context:
space:
mode:
authorPaul Dee <itsascambutmailmeanyway@gmail.com>2023-02-17 14:07:44 +0100
committerJo-Philipp Wich <jo@mein.io>2023-03-29 15:33:37 +0200
commitf407a013ba1e889ba4cd09eaf456724cb41e1537 (patch)
treea16877a2cc1321048b168e2266f3caf9699c52e1 /applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall
parent0484343903e9c284766044c2542fed1bc89b34e3 (diff)
luci-app-firewall: Add ipset field to rules
Signed-off-by: Paul Dee <itsascambutmailmeanyway@gmail.com>
Diffstat (limited to 'applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall')
-rw-r--r--applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js b/applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js
index 6aa0173ce5..5dda8075a2 100644
--- a/applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js
+++ b/applications/luci-app-firewall/htdocs/luci-static/resources/view/firewall/rules.js
@@ -371,6 +371,14 @@ return view.extend({
o.allowany = true;
o.allowlocal = 'src';
+ o = s.taboption('advanced', form.Value, 'ipset', _('Use ipset'));
+ uci.sections('firewall', 'ipset', function(s) {
+ if (typeof(s.name) == 'string')
+ this.value(s.name, s.comment ? '%s (%s)'.format(s.name, s.comment) : s.name);
+ });
+ o.modalonly = true;
+ o.rmempty = true;
+
fwtool.addMACOption(s, 'advanced', 'src_mac', _('Source MAC address'), null, hosts);
fwtool.addIPOption(s, 'general', 'src_ip', _('Source address'), null, '', hosts, true);