mirror of
https://gitlab.com/shorewall/code.git
synced 2024-11-09 01:04:06 +01:00
Another correction to the 'CT' target
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
a80b46be81
commit
c00068e08d
@ -60,6 +60,7 @@ sub process_notrack_rule( $$$$$$$ ) {
|
||||
my $rule = do_proto( $proto, $ports, $sports ) . do_user ( $user );
|
||||
|
||||
my $target = $action;
|
||||
my $exception_rule = '';
|
||||
|
||||
unless ( $action eq 'NOTRACK' ) {
|
||||
( $target, my ( $option, $args, $junk ) ) = split ':', $action, 4;
|
||||
@ -76,8 +77,10 @@ sub process_notrack_rule( $$$$$$$ ) {
|
||||
|
||||
if ( $option eq 'helper' ) {
|
||||
fatal_error "Invalid helper' ($args)" if $args =~ /,/;
|
||||
fatal_error "A protocol and destination port are required in CT:helper rules" if $ports eq '-';
|
||||
do_helper( $args );
|
||||
$action = "CT --helper $args";
|
||||
$exception_rule = do_proto( $proto, '-', '-' );
|
||||
} elsif ( $option eq 'ctevents' ) {
|
||||
for ( split ',', $args ) {
|
||||
fatal_error "Invalid 'ctevents' event ($_)" unless $valid_ctevent{$_};
|
||||
@ -104,7 +107,7 @@ sub process_notrack_rule( $$$$$$$ ) {
|
||||
$action ,
|
||||
'' ,
|
||||
$target ,
|
||||
'' ;
|
||||
$exception_rule ;
|
||||
|
||||
progress_message " Notrack rule \"$currentline\" $done";
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user