Skip to content

Commit

Permalink
luci-app-firewall: add log_limit
Browse files Browse the repository at this point in the history
This adds the 'log_limit' option to rules in Port Forwards and Traffic Rules.
For NAT Rules this is not supported.

Signed-off-by: Jan Froch <jan@froch.eu>
  • Loading branch information
JFroch committed Feb 22, 2025
1 parent 78ba926 commit f0578ef
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,11 @@ return view.extend({
o.modalonly = true;
o.default = o.disabled;

o = s.taboption('advanced', form.Value, 'log_limit', _('Limit log messages'));
o.depends('log', '1');
o.placeholder = '10/minute';
o.modalonly = true;

if (!L.hasSystemFeature('firewall4')) {
o = s.taboption('advanced', form.Value, 'extra', _('Extra arguments'),
_('Passes additional arguments to iptables. Use with care!'));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -470,6 +470,11 @@ return view.extend({
o.modalonly = true;
o.default = o.disabled;

o = s.taboption('advanced', form.Value, 'log_limit', _('Limit log messages'));
o.depends('log', '1');
o.placeholder = '10/minute';
o.modalonly = true;

if (!L.hasSystemFeature('firewall4')) {
o = s.taboption('advanced', form.Value, 'extra', _('Extra arguments'),
_('Passes additional arguments to iptables. Use with care!'));
Expand Down

0 comments on commit f0578ef

Please sign in to comment.