forked from extern/shorewall_code
Don't call generate_matrix() during 'check'
This commit is contained in:
parent
4fd338f3ca
commit
7f790e3aa2
@ -43,7 +43,7 @@ use Shorewall::Raw;
|
|||||||
our @ISA = qw(Exporter);
|
our @ISA = qw(Exporter);
|
||||||
our @EXPORT = qw( compiler EXPORT TIMESTAMP DEBUG );
|
our @EXPORT = qw( compiler EXPORT TIMESTAMP DEBUG );
|
||||||
our @EXPORT_OK = qw( $export );
|
our @EXPORT_OK = qw( $export );
|
||||||
our $VERSION = '4.3_12';
|
our $VERSION = '4.4_0';
|
||||||
|
|
||||||
our $export;
|
our $export;
|
||||||
|
|
||||||
@ -725,9 +725,9 @@ sub compiler {
|
|||||||
unless ( $command eq 'check' ) {
|
unless ( $command eq 'check' ) {
|
||||||
pop_indent;
|
pop_indent;
|
||||||
emit "}\n";
|
emit "}\n";
|
||||||
disable_object;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
disable_object;
|
||||||
#
|
#
|
||||||
# N E T F I L T E R
|
# N E T F I L T E R
|
||||||
# (Produces no output to the compiled script -- rules are stored in the chain table)
|
# (Produces no output to the compiled script -- rules are stored in the chain table)
|
||||||
@ -782,11 +782,6 @@ sub compiler {
|
|||||||
# Accounting.
|
# Accounting.
|
||||||
#
|
#
|
||||||
setup_accounting;
|
setup_accounting;
|
||||||
#
|
|
||||||
# We generate the matrix even though we don't write out the rules. That way, we insure that
|
|
||||||
# a compile of the script won't blow up during that step.
|
|
||||||
#
|
|
||||||
generate_matrix;
|
|
||||||
|
|
||||||
if ( $command eq 'check' ) {
|
if ( $command eq 'check' ) {
|
||||||
if ( $family == F_IPV4 ) {
|
if ( $family == F_IPV4 ) {
|
||||||
@ -795,6 +790,11 @@ sub compiler {
|
|||||||
progress_message3 "Shorewall6 configuration verified";
|
progress_message3 "Shorewall6 configuration verified";
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
#
|
||||||
|
# Generate the zone x zone matrix
|
||||||
|
#
|
||||||
|
generate_matrix;
|
||||||
|
|
||||||
enable_object;
|
enable_object;
|
||||||
#
|
#
|
||||||
# I N I T I A L I Z E
|
# I N I T I A L I Z E
|
||||||
|
@ -1634,8 +1634,8 @@ sub generate_matrix() {
|
|||||||
|
|
||||||
if ( $chainref->{policy} ne 'CONTINUE' ) {
|
if ( $chainref->{policy} ne 'CONTINUE' ) {
|
||||||
my $policyref = $filter_table->{$chainref->{policychain}};
|
my $policyref = $filter_table->{$chainref->{policychain}};
|
||||||
return $policyref->{name} if $policyref;
|
assert( $policyref );
|
||||||
fatal_error "No policy defined for zone $zone to zone $zone1";
|
return $policyref->{name} if
|
||||||
}
|
}
|
||||||
|
|
||||||
''; # CONTINUE policy
|
''; # CONTINUE policy
|
||||||
|
Loading…
Reference in New Issue
Block a user