Correct handling of masquerade port range when ADD_SNAT_ALIASES=Yes

Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
Tom Eastep 2016-11-02 12:28:00 -07:00
parent 9ae36e1989
commit 53d97bbcc8
No known key found for this signature in database
GPG Key ID: 96E6B3F2423A4D10

View File

@ -5363,6 +5363,7 @@ sub process_snat1( $$$$$$$$$$$$ ) {
$pre_nat = $1;
$addresses = ( $2 || '' );
$options = 'random' if $addresses =~ s/:?random$//;
$add_snat_aliases = '';
} elsif ( $action =~ /^SNAT(\+)?\((.+)\)$/ ) {
$pre_nat = $1;
$addresses = $2;
@ -5377,6 +5378,7 @@ sub process_snat1( $$$$$$$$$$$$ ) {
$pre_nat = $1;
} elsif ( $action eq 'MASQUERADE' ) {
$actiontype = $builtin_target{$target = 'MASQUERADE'};
$add_snat_aliases = '';
} else {
( $target , $params ) = get_target_param1( $action );