From 8218cb3444eb74126595602e1b9c983e88f2d330 Mon Sep 17 00:00:00 2001 From: Tom Eastep Date: Sat, 25 Dec 2010 10:15:08 -0800 Subject: [PATCH] Pass normalized action name to process_rule_common() --- Shorewall/Perl/Shorewall/Rules.pm | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/Shorewall/Perl/Shorewall/Rules.pm b/Shorewall/Perl/Shorewall/Rules.pm index 9196a3d85..4545e354d 100644 --- a/Shorewall/Perl/Shorewall/Rules.pm +++ b/Shorewall/Perl/Shorewall/Rules.pm @@ -268,8 +268,9 @@ sub map_old_actions( $ ) { sub process_rule_common ( $$$$$$$$$$$$$$$$ ); sub process_action1( $ ) { - my $action = shift; - my $actionfile = find_file "action.$action"; + my $wholeaction = shift; + my ( $action , $level, $tag, $param ) = split /:/, $wholeaction; + my $actionfile = find_file "action.$action"; fatal_error "Missing Action File ($actionfile)" unless -f $actionfile; @@ -285,7 +286,7 @@ sub process_action1( $ ) { # deals with the target and the parameter. We pass undef for the rest so we'll # know if we try to use one of them. # - process_rule_common( $action , + process_rule_common( $wholeaction , $wholetarget , '' , # Current Param undef, # source @@ -343,7 +344,7 @@ sub process_actions1() { fatal_error "Missing Action File ($actionfile)" unless -f $actionfile; - process_action1( $action ); + process_action1 normalize_action_name $action; } } } @@ -757,12 +758,13 @@ sub process_rule_common ( $$$$$$$$$$$$$$$$ ) { my $inaction1; my $inaction3; my $normalized_target; + my $normalized_action; if ( defined $chainref ) { if ( reftype $chainref ) { $inaction3 = 1; } else { - $inaction1 = $chainref; + ( $inaction1, undef, undef, undef ) = split /:/, $normalized_action = $chainref; } }