mirror of
https://gitlab.com/shorewall/code.git
synced 2025-06-20 09:47:51 +02:00
Remove another 'our' variable
This commit is contained in:
parent
c80b1b3585
commit
d9d31ff132
@ -51,7 +51,6 @@ our $VERSION = '4.4_13';
|
|||||||
#
|
#
|
||||||
# Set to one if we find a SECTION
|
# Set to one if we find a SECTION
|
||||||
#
|
#
|
||||||
our $sectioned;
|
|
||||||
our $macro_nest_level;
|
our $macro_nest_level;
|
||||||
our $current_param;
|
our $current_param;
|
||||||
our @param_stack;
|
our @param_stack;
|
||||||
@ -76,7 +75,6 @@ my %rules_commands = ( COMMENT => 0,
|
|||||||
#
|
#
|
||||||
sub initialize( $ ) {
|
sub initialize( $ ) {
|
||||||
$family = shift;
|
$family = shift;
|
||||||
$sectioned = 0;
|
|
||||||
$macro_nest_level = 0;
|
$macro_nest_level = 0;
|
||||||
$current_param = '';
|
$current_param = '';
|
||||||
@param_stack = ();
|
@param_stack = ();
|
||||||
@ -1510,7 +1508,6 @@ sub process_section ($) {
|
|||||||
#
|
#
|
||||||
fatal_error "Invalid SECTION ($sect)" unless defined $sections{$sect};
|
fatal_error "Invalid SECTION ($sect)" unless defined $sections{$sect};
|
||||||
fatal_error "Duplicate or out of order SECTION $sect" if $sections{$sect};
|
fatal_error "Duplicate or out of order SECTION $sect" if $sections{$sect};
|
||||||
$sectioned = 1;
|
|
||||||
$sections{$sect} = 1;
|
$sections{$sect} = 1;
|
||||||
|
|
||||||
if ( $sect eq 'RELATED' ) {
|
if ( $sect eq 'RELATED' ) {
|
||||||
@ -1593,17 +1590,12 @@ sub process_rule ( ) {
|
|||||||
my ( $target, $source, $dest, $proto, $ports, $sports, $origdest, $ratelimit, $user, $mark, $connlimit, $time ) = split_line1 1, 12, 'rules file', \%rules_commands;
|
my ( $target, $source, $dest, $proto, $ports, $sports, $origdest, $ratelimit, $user, $mark, $connlimit, $time ) = split_line1 1, 12, 'rules file', \%rules_commands;
|
||||||
|
|
||||||
process_comment, return 1 if $target eq 'COMMENT';
|
process_comment, return 1 if $target eq 'COMMENT';
|
||||||
|
|
||||||
process_section( $source ), return 1 if $target eq 'SECTION';
|
process_section( $source ), return 1 if $target eq 'SECTION';
|
||||||
#
|
#
|
||||||
# Section Names are optional so once we get to an actual rule, we need to be sure that
|
# Section Names are optional so once we get to an actual rule, we need to be sure that
|
||||||
# we close off any missing sections.
|
# we close off any missing sections.
|
||||||
#
|
#
|
||||||
unless ( $sectioned ) {
|
process_section( 'NEW' ) unless $section;
|
||||||
finish_section 'ESTABLISHED,RELATED';
|
|
||||||
$sections{$section = 'NEW'} = 1;
|
|
||||||
$sectioned = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( $source =~ /^none(:.*)?$/i || $dest =~ /^none(:.*)?$/i ) {
|
if ( $source =~ /^none(:.*)?$/i || $dest =~ /^none(:.*)?$/i ) {
|
||||||
progress_message "Rule \"$currentline\" ignored.";
|
progress_message "Rule \"$currentline\" ignored.";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user