mirror of
https://gitlab.com/shorewall/code.git
synced 2024-12-19 04:41:07 +01:00
Save current action chain along with params. Add get_action_chain()
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
89ee25dde2
commit
8ab45b4de3
@ -1800,13 +1800,14 @@ sub embedded_perl( $ ) {
|
|||||||
#
|
#
|
||||||
# Push/pop action params
|
# Push/pop action params
|
||||||
#
|
#
|
||||||
sub push_action_params( $ ) {
|
sub push_action_params( $$ ) {
|
||||||
my @params = split /,/, $_[0];
|
my @params = split /,/, $_[1];
|
||||||
my $oldparams = \@actparms;
|
my $oldparams = \@actparms;
|
||||||
my $params = @params;
|
my $params = @params;
|
||||||
|
|
||||||
@actparms = ();
|
@actparms = ();
|
||||||
|
|
||||||
|
$actparms[0] = $_[0];
|
||||||
@actparms[1..$params] = @params;
|
@actparms[1..$params] = @params;
|
||||||
|
|
||||||
$oldparams;
|
$oldparams;
|
||||||
@ -1835,6 +1836,10 @@ sub get_action_params( $ ) {
|
|||||||
@actparms[1..$num];
|
@actparms[1..$num];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sub get_actionchain() {
|
||||||
|
$actparms[0];
|
||||||
|
}
|
||||||
|
|
||||||
sub set_action_param( $$ ) {
|
sub set_action_param( $$ ) {
|
||||||
my $i = shift;
|
my $i = shift;
|
||||||
|
|
||||||
|
@ -1465,7 +1465,7 @@ sub process_action( $) {
|
|||||||
|
|
||||||
push_open $actionfile;
|
push_open $actionfile;
|
||||||
|
|
||||||
my $oldparms = push_action_params( $param );
|
my $oldparms = push_action_params( $chainref, $param );
|
||||||
|
|
||||||
$active{$wholeaction}++;
|
$active{$wholeaction}++;
|
||||||
push @actionstack, $wholeaction;
|
push @actionstack, $wholeaction;
|
||||||
|
Loading…
Reference in New Issue
Block a user