Consolidate declarations in process_mark_rule().

Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
Tom Eastep 2013-12-24 09:49:10 -08:00
parent 5419109880
commit 3960aaee4c

View File

@ -980,13 +980,7 @@ sub process_mark_rule( $$$$$$$$$$$$$$$$ ) {
} }
} }
my ( $command, $designator ) = split_action( $action ); my ( $command, $designator );
if ( supplied $designator ) {
fatal_error "Invalid chain designator ( $designator )" unless $designators{$designator};
}
( $command , $params ) = get_target_param1( $command );
my %commands = ( my %commands = (
CHECKSUM => { CHECKSUM => {
@ -1297,6 +1291,16 @@ sub process_mark_rule( $$$$$$$$$$$$$$$$ ) {
}, },
); );
#
# Function Body
#
( $command, $designator ) = split_action( $action );
if ( supplied $designator ) {
fatal_error "Invalid chain designator ( $designator )" unless $designators{$designator};
}
( $command , $params ) = get_target_param1( $command );
my $commandref = $commands{$command}; my $commandref = $commands{$command};