From fe86964fd68b5c98116bfe60b796930dc17dd561 Mon Sep 17 00:00:00 2001 From: Tom Eastep Date: Sun, 2 Jan 2011 08:42:09 -0800 Subject: [PATCH] Move and reword an error message Signed-off-by: Tom Eastep --- Shorewall/Perl/Shorewall/Rules.pm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Shorewall/Perl/Shorewall/Rules.pm b/Shorewall/Perl/Shorewall/Rules.pm index e55c2d580..840a5fff9 100644 --- a/Shorewall/Perl/Shorewall/Rules.pm +++ b/Shorewall/Perl/Shorewall/Rules.pm @@ -1217,8 +1217,6 @@ sub process_rule1 ( $$$$$$$$$$$$$$$$ ) { $serverport = $3; # Not Empty due to RE $origdstports = $ports; - fatal_error "Server port ($serverport) not allowed in $action rule" if $actiontype & ACTION; - if ( $origdstports && $origdstports ne '-' && port_count( $origdstports ) == 1 ) { $origdstports = validate_port( $proto, $origdstports ); } else { @@ -1272,6 +1270,7 @@ sub process_rule1 ( $$$$$$$$$$$$$$$$ ) { } } } elsif ( $actiontype & ACTION ) { + fatal_error "A server port ($serverport) is not allowed in $action rule" if $serverport; $target = $usedactions{$normalized_target}->{name}; $loglevel = ''; } else {