mirror of
https://gitlab.com/shorewall/code.git
synced 2025-06-20 09:47:51 +02:00
Ensure that action and macro files always allow comment directives.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
4d2379f542
commit
0acd93a032
@ -2559,14 +2559,14 @@ EOF
|
|||||||
# The following two functions allow module clients to nest opens. This happens frequently
|
# The following two functions allow module clients to nest opens. This happens frequently
|
||||||
# in the Rules module.
|
# in the Rules module.
|
||||||
#
|
#
|
||||||
sub push_open( $;$ ) {
|
sub push_open( $;$$ ) {
|
||||||
my ( $file, $max ) = @_;
|
my ( $file, $max , $ca) = @_;
|
||||||
push @includestack, [ $currentfile, $currentfilename, $currentlinenumber, $ifstack, $file_format, $max_format ] if $currentfile;
|
push @includestack, [ $currentfile, $currentfilename, $currentlinenumber, $ifstack, $file_format, $max_format ] if $currentfile;
|
||||||
my @a = @includestack;
|
my @a = @includestack;
|
||||||
push @openstack, \@a;
|
push @openstack, \@a;
|
||||||
@includestack = ();
|
@includestack = ();
|
||||||
$currentfile = undef;
|
$currentfile = undef;
|
||||||
open_file( $file , $max, $comments_allowed );
|
open_file( $file , $max, $comments_allowed || $ca );
|
||||||
}
|
}
|
||||||
|
|
||||||
sub pop_open() {
|
sub pop_open() {
|
||||||
|
@ -1472,7 +1472,7 @@ sub process_actions() {
|
|||||||
$targets{$_} = new_action( $_ , ACTION + BUILTIN, 1, 0 ) for @builtins;
|
$targets{$_} = new_action( $_ , ACTION + BUILTIN, 1, 0 ) for @builtins;
|
||||||
|
|
||||||
for my $file ( qw/actions.std actions/ ) {
|
for my $file ( qw/actions.std actions/ ) {
|
||||||
open_file( $file, 2, 1 );
|
open_file( $file, 2 );
|
||||||
|
|
||||||
while ( read_a_line( NORMAL_READ ) ) {
|
while ( read_a_line( NORMAL_READ ) ) {
|
||||||
my ( $action, $options ) = split_line 'action file' , { action => 0, options => 1 };
|
my ( $action, $options ) = split_line 'action file' , { action => 0, options => 1 };
|
||||||
@ -1552,7 +1552,7 @@ sub process_action($) {
|
|||||||
|
|
||||||
progress_message2 "$doing $actionfile for chain $chainref->{name}...";
|
progress_message2 "$doing $actionfile for chain $chainref->{name}...";
|
||||||
|
|
||||||
push_open $actionfile, 2;
|
push_open $actionfile, 2, 1;
|
||||||
|
|
||||||
my $oldparms = push_action_params( $chainref, $param, $level, $tag );
|
my $oldparms = push_action_params( $chainref, $param, $level, $tag );
|
||||||
|
|
||||||
@ -1798,7 +1798,7 @@ sub process_inline ($$$$$$$$$$$$$$$$$$$$) {
|
|||||||
|
|
||||||
progress_message "..Expanding inline action $inlinefile...";
|
progress_message "..Expanding inline action $inlinefile...";
|
||||||
|
|
||||||
push_open $inlinefile;
|
push_open $inlinefile, 2;
|
||||||
|
|
||||||
while ( read_a_line( NORMAL_READ ) ) {
|
while ( read_a_line( NORMAL_READ ) ) {
|
||||||
my ( $mtarget,
|
my ( $mtarget,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user