-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
On 10/26/2016 01:19 PM, Steven Jan Springl wrote:
> Tom
>
> Issuing a "shorewall update" command converts the following masq
> file entry
>
> +br1::!192.168.23.0/27 10.1.2.0/24!10.1.2.1,10.1.1.4-10.1.1.8 -
> icmp 4/3,8,12
>
> to snat file entry:
>
> MASQUERADE+ 10.1.2.0/24!10.1.2.1,10.1.1.4-10.1.1.8
> br1::!192.168.23.0/27 icmp 4/3,8,12
>
> Which produces the following messages:
>
> Converting /etc/shorewall200/masq...
>
> Converted /etc/shorewall200/masq to /etc/shorewall200/snat
>
> /etc/shorewall200/masq renamed /etc/shorewall200/masq.bak Use of
> uninitialized value $actiontype in bitwise and (&) at
> /usr/share/shorewall/Shorewall/Rules.pm line 5387, <$currentfile>
>
> line 15. ERROR: Invalid ACTION (MASQUERADE+)
> /etc/shorewall200/snat (line 15)
>
The attached patch seems to resolve the issue for me.
Thanks, Steven.
- -Tom
- --
Tom Eastep \ When I die, I want to go like my Grandfather who
Shoreline, \ died peacefully in his sleep. Not screaming like
Washington, USA \ all of the passengers in his car
http://shorewall.net \________________________________________________
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
Comment: GPGTools - http://gpgtools.org
iQIcBAEBCAAGBQJYESGpAAoJEJbms/JCOk0Q1V8P+wRv2rOC9+es1UF+yfaT/A9D
KCdUr7PIUxAdn/hbNRCf9+j5B5B+IKF1KatS5fnfwJifEmKFLuuwSk7Zcz+c7VpW
OCBEUTMC9H/zc9TZYphqdyeKIdrQIeMVuOtbZReQ1UD4zwxhUMlFiRpWc+H55xTp
PEOrEiVySFuL26M1PP91VL+vSoxJya6uwjDeSAF0iZVaoQgPlG467W8DxqW5fLJL
ei7KkSf7VGxY2BJ03lC6SxfdPMToUEKNiXF9a5eSxOTr6ueVprcxrUjLlqCexSpz
9PJ88N6Fu7+oN02EGvbrDq9sstUt6q4jmaOhihohcVTS+Fi7gYcUq49tVCcfoPwP
k3odEH0hI/KhRSSnukwt2gKQBf3wbhGpiSYNiY8i3+G0IDQym9D5YgZSmpQheZOO
FB5n9/iRWExFrscmIL+BhtYNGIqVvlRmvHCTJt9VJ66vEsYhVAKrSZJ7iDmQCkSd
P60v85W+LbLAX5KayL0DwjH2o0nUsyKpkAT2q2hDG8qUCz19+vdTQKTNhjE+G3nD
Fes99cKuBG2O7EaPOTPDk6DcpGO6allHcPtZMQDzofIk/kJibX0bgcaWxLX/50IR
5pxy0fDj6aZmH4r7zXKy2DEuatSqgzWRtA6gMSyHJAG3Ry8HTpfVUpudkHje5CZN
91gMv35Y8HFdcW018+qR
=cwVd
-----END PGP SIGNATURE-----
diff --git a/Shorewall/Perl/Shorewall/Rules.pm b/Shorewall/Perl/Shorewall/Rules.pm
index dad0c7c..7c849d9 100644
--- a/Shorewall/Perl/Shorewall/Rules.pm
+++ b/Shorewall/Perl/Shorewall/Rules.pm
@@ -5357,11 +5357,11 @@ sub process_snat1( $$$$$$$$$$$$ ) {
my $interfaces;
my $normalized_action;
- if ( $action =~ /^MASQUERADE(\+)?\((.+)\)$/ ) {
+ if ( $action =~ /^MASQUERADE(\+)?(\((.+)\))?$/ ) {
$target = 'MASQUERADE';
$actiontype = $builtin_target{$action = $target};
$pre_nat = $1;
- $addresses = $2;
+ $addresses = ( $2 || '' );
$options = 'random' if $addresses =~ s/:?random$//;
} elsif ( $action =~ /^SNAT(\+)?\((.+)\)$/ ) {
$pre_nat = $1;
@@ -5382,7 +5382,7 @@ sub process_snat1( $$$$$$$$$$$$ ) {
$pre_nat = ( $target =~ s/\+$// );
- $actiontype = $targets{$target};
+ $actiontype = ( $targets{$target} || 0 );
fatal_error "Invalid ACTION ($action)" unless $actiontype & ( ACTION | INLINE );
}
------------------------------------------------------------------------------
The Command Line: Reinvented for Modern Developers
Did the resurgence of CLI tooling catch you by surprise?
Reconnect with the command line and become more productive.
Learn the new .NET and ASP.NET CLI. Get your free copy!
http://sdm.link/telerik
_______________________________________________
Shorewall-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/shorewall-devel