mirror of
https://gitlab.com/shorewall/code.git
synced 2024-12-23 06:38:53 +01:00
Allow a notrack with nothing but FORMAT and COMMENT lines to be removed.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
3c35af9d8c
commit
f6c4650624
@ -212,11 +212,7 @@ sub setup_conntrack() {
|
||||
|
||||
my $empty = 1;
|
||||
|
||||
first_entry( sub () { progress_message2 "$doing $fn...";
|
||||
$empty = 0;
|
||||
warning_message( "Non-empty notrack file ($fn); please move its contents to the conntrack file" ) if $name eq 'notrack';
|
||||
}
|
||||
);
|
||||
first_entry( "$doing $fn..." );
|
||||
|
||||
while ( read_a_line( NORMAL_READ ) ) {
|
||||
my ( $source, $dest, $proto, $ports, $sports, $user );
|
||||
@ -248,6 +244,8 @@ sub setup_conntrack() {
|
||||
}
|
||||
}
|
||||
|
||||
$empty = 0;
|
||||
|
||||
if ( $source eq 'all' ) {
|
||||
for my $zone (all_zones) {
|
||||
process_conntrack_rule( undef, undef, $action, $zone, $dest, $proto, $ports, $sports, $user );
|
||||
|
Loading…
Reference in New Issue
Block a user