Save current action chain along with params. Add get_action_chain()

Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
Tom Eastep 2011-07-01 16:21:36 -07:00
parent 89ee25dde2
commit 8ab45b4de3
2 changed files with 8 additions and 3 deletions

View File

@ -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;

View File

@ -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;