mirror of
https://github.com/webmin/webmin.git
synced 2026-05-06 15:20:29 +01:00
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).
18 lines
326 B
Perl
Executable File
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");
|