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:
Tom Eastep 2012-08-16 10:49:59 -07:00
parent 3c35af9d8c
commit f6c4650624

View File

@ -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 );