diff --git a/nftables/nftables-lib.pl b/nftables/nftables-lib.pl index 92ac64b5a..472d11e17 100644 --- a/nftables/nftables-lib.pl +++ b/nftables/nftables-lib.pl @@ -2024,13 +2024,20 @@ foreach my $r (@{$table->{'rules'}}) { return; } +# nftables_save_header() +# Returns the generated-file header for saved rules +sub nftables_save_header +{ +return "# This file was auto-generated by the module.\n". + "# Manual changes may be overwritten.\n\n"; +} # dump_nftables_save(@tables) # Returns a string representation of the firewall rules sub dump_nftables_save { my (@tables) = @_; -my $rv; +my $rv = nftables_save_header(); foreach my $t (@tables) { if ($t->{'family'}) { $rv .= "table $t->{'family'} $t->{'name'} {\n";