Eliminate a variable

Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
Tom Eastep 2011-12-18 15:01:13 -08:00
parent c00068e08d
commit 1c8f6d3856

View File

@ -57,8 +57,6 @@ sub process_notrack_rule( $$$$$$$ ) {
fatal_error 'USER/GROUP is not allowed unless the SOURCE zone is $FW or a Vserver zone' if $user ne '-' && $restriction != OUTPUT_RESTRICT; fatal_error 'USER/GROUP is not allowed unless the SOURCE zone is $FW or a Vserver zone' if $user ne '-' && $restriction != OUTPUT_RESTRICT;
require_capability 'RAW_TABLE', 'Notrack rules', ''; require_capability 'RAW_TABLE', 'Notrack rules', '';
my $rule = do_proto( $proto, $ports, $sports ) . do_user ( $user );
my $target = $action; my $target = $action;
my $exception_rule = ''; my $exception_rule = '';
@ -77,7 +75,7 @@ sub process_notrack_rule( $$$$$$$ ) {
if ( $option eq 'helper' ) { if ( $option eq 'helper' ) {
fatal_error "Invalid helper' ($args)" if $args =~ /,/; fatal_error "Invalid helper' ($args)" if $args =~ /,/;
fatal_error "A protocol and destination port are required in CT:helper rules" if $ports eq '-'; fatal_error "A protocol protocol is required in CT:helper rules" if $proto eq '-';
do_helper( $args ); do_helper( $args );
$action = "CT --helper $args"; $action = "CT --helper $args";
$exception_rule = do_proto( $proto, '-', '-' ); $exception_rule = do_proto( $proto, '-', '-' );
@ -97,17 +95,16 @@ sub process_notrack_rule( $$$$$$$ ) {
} }
} }
expand_rule expand_rule( $chainref ,
$chainref ,
$restriction , $restriction ,
$rule , do_proto( $proto, $ports, $sports ) . do_user ( $user ) ,
$source , $source ,
$dest , $dest ,
'' , '' ,
$action , $action ,
'' , '' ,
$target , $target ,
$exception_rule ; $exception_rule );
progress_message " Notrack rule \"$currentline\" $done"; progress_message " Notrack rule \"$currentline\" $done";