From f6c465062416f5906c07d56b2270be13012451f4 Mon Sep 17 00:00:00 2001 From: Tom Eastep Date: Thu, 16 Aug 2012 10:49:59 -0700 Subject: [PATCH] Allow a notrack with nothing but FORMAT and COMMENT lines to be removed. Signed-off-by: Tom Eastep --- Shorewall/Perl/Shorewall/Raw.pm | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/Shorewall/Perl/Shorewall/Raw.pm b/Shorewall/Perl/Shorewall/Raw.pm index 89abf8acc..f212d0366 100644 --- a/Shorewall/Perl/Shorewall/Raw.pm +++ b/Shorewall/Perl/Shorewall/Raw.pm @@ -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 );