Files
webmin/nftables/apply.cgi
Ilia Ross 7f2b4b00aa Fix to scope direct-mode changes to selected tables
Fix nftables direct-mode operations so create, edit, delete, and move actions apply only the selected table instead of rewriting or applying the full ruleset. This avoids copying firewalld-owned rules, or any other externally managed rules, into Webmin’s save file and prevents operations from failing against externally managed tables. Also remove previously added unsafe full-ruleset flush action and keep Apply Configuration out of direct mode (will be further reworked).
2026-05-02 17:08:35 +02:00

18 lines
326 B
Perl
Executable File

#!/usr/bin/perl
# apply.cgi
# Apply the current configuration
require './nftables-lib.pl'; ## no critic
use strict;
use warnings;
our (%config, %in, %text);
ReadParse();
error_setup($text{'apply_err'});
redirect("index.cgi") if ($config{'direct'});
my $err = apply_restore();
error($err) if ($err);
redirect("index.cgi");