On 03/18/2016 02:27 PM, Steven Jan Springl wrote:
> Tom
>
> The attached minimal config. produces the following error message:
>
> Compiling /etc/shorewall202/action.mangle2 for chain mangle2...
>
> Can't use string ("0") as a HASH ref while "strict refs" in use
> at /usr/share/shorewall/Shorewall/Rules.pm line 4474, <$currentfile>
> line 6.
> The attached patch corrects this problem along with another problem that your test case uncovered. 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 \________________________________________________
diff --git a/Shorewall/Perl/Shorewall/Rules.pm b/Shorewall/Perl/Shorewall/Rules.pm
index e2a698a..fc6488b 100644
--- a/Shorewall/Perl/Shorewall/Rules.pm
+++ b/Shorewall/Perl/Shorewall/Rules.pm
@@ -535,13 +535,13 @@ sub process_default_action( $$$$ ) {
} elsif ( ( $targets{$def} || 0 ) == INLINE ) {
$default = $def;
$default = "$def($param)" if supplied $param;
+ $default = join( ':', $default, $level ) if $level ne 'none';
} elsif ( $default_option ) {
fatal_error "Unknown Action ($default) in $policy setting";
} else {
fatal_error "Unknown Default Action ($default)";
}
- $default = join( ':', $default, $level ) if $level ne 'none';
} else {
$default = $default_actions{$policy} || 'none';
}
@@ -4544,14 +4544,14 @@ sub process_mangle_rule1( $$$$$$$$$$$$$$$$$$ ) {
#
# Capture the name of the action chain
#
- $target = $ref->{name};
} else {
#
# We've seen this tuple before
#
- $target = $usedactions{$normalized_target}->{name};
+ $ref = $usedactions{$normalized_target};
}
+ $target = $ref->{name};
$commandref->{allowedchains} = $ref->{allowedchains};
}
};
signature.asc
Description: OpenPGP digital signature
------------------------------------------------------------------------------ Transform Data into Opportunity. Accelerate data analysis in your applications with Intel Data Analytics Acceleration Library. Click to learn more. http://pubads.g.doubleclick.net/gampad/clk?id=278785231&iu=/4140
_______________________________________________ Shorewall-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/shorewall-devel
