Suppress extra COMMENT warnings

This commit is contained in:
Tom Eastep 2009-11-10 17:17:55 -08:00
parent 1735e168b1
commit 893a847c87
3 changed files with 11 additions and 1 deletions

View File

@ -248,6 +248,7 @@ our $iprangematch;
our $chainseq; our $chainseq;
our $idiotcount; our $idiotcount;
our $idiotcount1; our $idiotcount1;
our $warningcount;
our $global_variables; our $global_variables;
@ -358,6 +359,7 @@ sub initialize( $ ) {
$global_variables = 0; $global_variables = 0;
$idiotcount = 0; $idiotcount = 0;
$idiotcount1 = 0; $idiotcount1 = 0;
$warningcount = 0;
} }
@ -369,7 +371,7 @@ sub process_comment() {
( $comment = $currentline ) =~ s/^\s*COMMENT\s*//; ( $comment = $currentline ) =~ s/^\s*COMMENT\s*//;
$comment =~ s/\s*$//; $comment =~ s/\s*$//;
} else { } else {
warning_message "COMMENT ignored -- requires comment support in iptables/Netfilter"; warning_message "COMMENTs ignored -- require comment support in iptables/Netfilter" unless $warningcount++;
} }
} }

View File

@ -12,6 +12,8 @@ Changes in Shorewall 4.4.4
6) Implement ZONE2ZONE option. 6) Implement ZONE2ZONE option.
7) Suppress duplicate COMMENT warnings.
Changes in Shorewall 4.4.3 Changes in Shorewall 4.4.3
1) Move Debian INITLOG initialization to /etc/default/shorewall 1) Move Debian INITLOG initialization to /etc/default/shorewall

View File

@ -262,6 +262,12 @@ None.
value "-" (e.g., ZONE2ZONE="-") which causes Shorewall to separate value "-" (e.g., ZONE2ZONE="-") which causes Shorewall to separate
the two parts of the name with a hyphen (e.g., foo123-bar). the two parts of the name with a hyphen (e.g., foo123-bar).
5) Only one instance of this warning is now generated; previously, one
instance of a similar warning was generated for each COMMENT
encountered.
COMMENTs ignored -- require comment support in iptables/Netfilter
---------------------------------------------------------------------------- ----------------------------------------------------------------------------
N E W F E A T U R E S I N 4 . 4 . 0 N E W F E A T U R E S I N 4 . 4 . 0
---------------------------------------------------------------------------- ----------------------------------------------------------------------------