mirror of
https://gitlab.com/shorewall/code.git
synced 2025-06-20 17:58:07 +02:00
Fix MASQUERADE+ Handling
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
21877d5fcb
commit
579910fdb8
@ -5357,11 +5357,11 @@ sub process_snat1( $$$$$$$$$$$$ ) {
|
|||||||
my $interfaces;
|
my $interfaces;
|
||||||
my $normalized_action;
|
my $normalized_action;
|
||||||
|
|
||||||
if ( $action =~ /^MASQUERADE(\+)?\((.+)\)$/ ) {
|
if ( $action =~ /^MASQUERADE(\+)?(?:\((.+)\))?$/ ) {
|
||||||
$target = 'MASQUERADE';
|
$target = 'MASQUERADE';
|
||||||
$actiontype = $builtin_target{$action = $target};
|
$actiontype = $builtin_target{$action = $target};
|
||||||
$pre_nat = $1;
|
$pre_nat = $1;
|
||||||
$addresses = $2;
|
$addresses = ( $2 || '' );
|
||||||
$options = 'random' if $addresses =~ s/:?random$//;
|
$options = 'random' if $addresses =~ s/:?random$//;
|
||||||
} elsif ( $action =~ /^SNAT(\+)?\((.+)\)$/ ) {
|
} elsif ( $action =~ /^SNAT(\+)?\((.+)\)$/ ) {
|
||||||
$pre_nat = $1;
|
$pre_nat = $1;
|
||||||
@ -5382,7 +5382,7 @@ sub process_snat1( $$$$$$$$$$$$ ) {
|
|||||||
|
|
||||||
$pre_nat = ( $target =~ s/\+$// );
|
$pre_nat = ( $target =~ s/\+$// );
|
||||||
|
|
||||||
$actiontype = $targets{$target};
|
$actiontype = ( $targets{$target} || 0 );
|
||||||
|
|
||||||
fatal_error "Invalid ACTION ($action)" unless $actiontype & ( ACTION | INLINE );
|
fatal_error "Invalid ACTION ($action)" unless $actiontype & ( ACTION | INLINE );
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user