Fix COMMENT in action files

git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@6208 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
teastep 2007-05-03 14:24:56 +00:00
parent 14a243fa20
commit 61fb84d23b

View File

@ -296,7 +296,7 @@ sub process_actions1() {
fatal_error "An action may not invoke itself" if $target eq $action;
add_requiredby $wholetarget, $action if $targettype & ACTION;
} else {
} elsif ( $target ne 'COMMENT' ) {
$target =~ s!/.*$!!;
if ( find_macro $target ) {
@ -396,13 +396,6 @@ sub process_action3( $$$$$ ) {
my ($target, $source, $dest, $proto, $ports, $sports, $rate, $user ) = split_line 1, 8, 'action file';
my $target2 = merge_levels $wholeaction, $target;
my ( $action2 , $level2 ) = split_action $target2;
my $action2type = $targets{isolate_basic_target $action2};
unless ( $action2type == STANDARD ) {
if ( $target eq 'COMMENT' ) {
if ( $capabilities{COMMENTS} ) {
( $comment = $line ) =~ s/^\s*COMMENT\s*//;
@ -410,7 +403,18 @@ sub process_action3( $$$$$ ) {
} else {
warning_message "COMMENT ignored -- requires comment support in iptables/Netfilter";
}
} elsif ( $action2type & ACTION ) {
next;
}
my $target2 = merge_levels $wholeaction, $target;
my ( $action2 , $level2 ) = split_action $target2;
my $action2type = $targets{isolate_basic_target $action2};
unless ( $action2type == STANDARD ) {
if ( $action2type & ACTION ) {
$target2 = (find_logactionchain ( $target = $target2 ))->{name};
} else {
die "Internal Error" unless $action2type == MACRO || $action2type & LOGRULE;