mirror of
https://gitlab.com/shorewall/code.git
synced 2024-12-18 20:30:43 +01: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
@ -497,11 +497,11 @@ my $max_format; # Max format value
|
||||
our $comment; # Current COMMENT
|
||||
my @comments;
|
||||
my $comments_allowed;
|
||||
my $warningcount;
|
||||
my $warningcount1;
|
||||
my $warningcount2;
|
||||
my $warningcount;
|
||||
my $warningcount1;
|
||||
my $warningcount2;
|
||||
|
||||
my $shorewall_dir; # Shorewall Directory; if non-empty, search here first for files.
|
||||
my $shorewall_dir; # Shorewall Directory; if non-empty, search here first for files.
|
||||
|
||||
our $debug; # Global debugging flag
|
||||
my $confess; # If true, use Carp to report errors with stack trace.
|
||||
@ -514,9 +514,9 @@ our $Product; # $product with initial cap.
|
||||
|
||||
our $sillyname; # Name of temporary filter chains for testing capabilities
|
||||
our $sillyname1;
|
||||
my $iptables; # Path to iptables/ip6tables
|
||||
my $tc; # Path to tc
|
||||
my $ip; # Path to ip
|
||||
my $iptables; # Path to iptables/ip6tables
|
||||
my $tc; # Path to tc
|
||||
my $ip; # Path to ip
|
||||
|
||||
my $shell; # Type of shell that processed the params file
|
||||
|
||||
@ -2559,14 +2559,14 @@ EOF
|
||||
# The following two functions allow module clients to nest opens. This happens frequently
|
||||
# in the Rules module.
|
||||
#
|
||||
sub push_open( $;$ ) {
|
||||
my ( $file, $max ) = @_;
|
||||
sub push_open( $;$$ ) {
|
||||
my ( $file, $max , $ca) = @_;
|
||||
push @includestack, [ $currentfile, $currentfilename, $currentlinenumber, $ifstack, $file_format, $max_format ] if $currentfile;
|
||||
my @a = @includestack;
|
||||
push @openstack, \@a;
|
||||
@includestack = ();
|
||||
$currentfile = undef;
|
||||
open_file( $file , $max, $comments_allowed );
|
||||
open_file( $file , $max, $comments_allowed || $ca );
|
||||
}
|
||||
|
||||
sub pop_open() {
|
||||
|
@ -1472,7 +1472,7 @@ sub process_actions() {
|
||||
$targets{$_} = new_action( $_ , ACTION + BUILTIN, 1, 0 ) for @builtins;
|
||||
|
||||
for my $file ( qw/actions.std actions/ ) {
|
||||
open_file( $file, 2, 1 );
|
||||
open_file( $file, 2 );
|
||||
|
||||
while ( read_a_line( NORMAL_READ ) ) {
|
||||
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}...";
|
||||
|
||||
push_open $actionfile, 2;
|
||||
push_open $actionfile, 2, 1;
|
||||
|
||||
my $oldparms = push_action_params( $chainref, $param, $level, $tag );
|
||||
|
||||
@ -1798,7 +1798,7 @@ sub process_inline ($$$$$$$$$$$$$$$$$$$$) {
|
||||
|
||||
progress_message "..Expanding inline action $inlinefile...";
|
||||
|
||||
push_open $inlinefile;
|
||||
push_open $inlinefile, 2;
|
||||
|
||||
while ( read_a_line( NORMAL_READ ) ) {
|
||||
my ( $mtarget,
|
||||
|
Loading…
Reference in New Issue
Block a user