From 53d97bbcc819c157dbd171ea523de6be5f48a3a6 Mon Sep 17 00:00:00 2001 From: Tom Eastep Date: Wed, 2 Nov 2016 12:28:00 -0700 Subject: [PATCH] Correct handling of masquerade port range when ADD_SNAT_ALIASES=Yes Signed-off-by: Tom Eastep --- Shorewall/Perl/Shorewall/Rules.pm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Shorewall/Perl/Shorewall/Rules.pm b/Shorewall/Perl/Shorewall/Rules.pm index e99d65e31..be91e1d58 100644 --- a/Shorewall/Perl/Shorewall/Rules.pm +++ b/Shorewall/Perl/Shorewall/Rules.pm @@ -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 );