luci-app-firewall: Add ipset field to snats
Signed-off-by: Paul Dee <itsascambutmailmeanyway@gmail.com>
This commit is contained in:
parent
d0d891c23e
commit
48086e1c7b
1 changed files with 12 additions and 1 deletions
|
@ -313,6 +313,17 @@ return view.extend({
|
|||
o.depends({ proto: 'tcp', '!contains': true });
|
||||
o.depends({ proto: 'udp', '!contains': true });
|
||||
|
||||
var have_fw4 = L.hasSystemFeature('firewall4')
|
||||
if (!have_fw4) {
|
||||
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;
|
||||
}
|
||||
|
||||
o = s.taboption('advanced', widgets.DeviceSelect, 'device', _('Outbound device'),
|
||||
_('Matches forwarded traffic using the specified outbound network device.'));
|
||||
o.noaliases = true;
|
||||
|
@ -323,7 +334,7 @@ return view.extend({
|
|||
fwtool.addLimitOption(s);
|
||||
fwtool.addLimitBurstOption(s);
|
||||
|
||||
if (!L.hasSystemFeature('firewall4')) {
|
||||
if (!have_fw4) {
|
||||
o = s.taboption('advanced', form.Value, 'extra', _('Extra arguments'),
|
||||
_('Passes additional arguments to iptables. Use with care!'));
|
||||
o.modalonly = true;
|
||||
|
|
Loading…
Reference in a new issue