diff --git a/Shorewall/Perl/Shorewall/Config.pm b/Shorewall/Perl/Shorewall/Config.pm index 664b0da3a..e23588498 100644 --- a/Shorewall/Perl/Shorewall/Config.pm +++ b/Shorewall/Perl/Shorewall/Config.pm @@ -1800,13 +1800,14 @@ sub embedded_perl( $ ) { # # Push/pop action params # -sub push_action_params( $ ) { - my @params = split /,/, $_[0]; +sub push_action_params( $$ ) { + my @params = split /,/, $_[1]; my $oldparams = \@actparms; my $params = @params; @actparms = (); + $actparms[0] = $_[0]; @actparms[1..$params] = @params; $oldparams; @@ -1835,6 +1836,10 @@ sub get_action_params( $ ) { @actparms[1..$num]; } +sub get_actionchain() { + $actparms[0]; +} + sub set_action_param( $$ ) { my $i = shift; diff --git a/Shorewall/Perl/Shorewall/Rules.pm b/Shorewall/Perl/Shorewall/Rules.pm index 4fd647440..6ff1ef848 100644 --- a/Shorewall/Perl/Shorewall/Rules.pm +++ b/Shorewall/Perl/Shorewall/Rules.pm @@ -1465,7 +1465,7 @@ sub process_action( $) { push_open $actionfile; - my $oldparms = push_action_params( $param ); + my $oldparms = push_action_params( $chainref, $param ); $active{$wholeaction}++; push @actionstack, $wholeaction;