mirror of
https://gitlab.com/shorewall/code.git
synced 2025-06-20 01:37:59 +02:00
Trivial optimization
git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@8164 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
parent
c819e1fea7
commit
f229aaf5dc
@ -1509,11 +1509,12 @@ sub generate_matrix() {
|
|||||||
my @interfaces = ( all_interfaces );
|
my @interfaces = ( all_interfaces );
|
||||||
my $preroutingref = ensure_chain 'nat', 'dnat';
|
my $preroutingref = ensure_chain 'nat', 'dnat';
|
||||||
my $fw = firewall_zone;
|
my $fw = firewall_zone;
|
||||||
|
my @zones = non_firewall_zones;
|
||||||
|
|
||||||
#
|
#
|
||||||
# Set up forwarding chain for each zone
|
# Set up forwarding chain for each zone
|
||||||
#
|
#
|
||||||
for my $zone ( non_firewall_zones ) {
|
for my $zone ( @zones ) {
|
||||||
my $frwd_ref = new_standard_chain zone_forward_chain( $zone );
|
my $frwd_ref = new_standard_chain zone_forward_chain( $zone );
|
||||||
my $zoneref = find_zone( $zone );
|
my $zoneref = find_zone( $zone );
|
||||||
my $exclusions = $zoneref->{exclusions};
|
my $exclusions = $zoneref->{exclusions};
|
||||||
@ -1571,7 +1572,7 @@ sub generate_matrix() {
|
|||||||
#
|
#
|
||||||
# Main source-zone matrix-generation loop
|
# Main source-zone matrix-generation loop
|
||||||
#
|
#
|
||||||
for my $zone ( non_firewall_zones ) {
|
for my $zone ( @zones ) {
|
||||||
my $zoneref = find_zone( $zone );
|
my $zoneref = find_zone( $zone );
|
||||||
my $source_hosts_ref = $zoneref->{hosts};
|
my $source_hosts_ref = $zoneref->{hosts};
|
||||||
my $chain1 = rules_target firewall_zone , $zone;
|
my $chain1 = rules_target firewall_zone , $zone;
|
||||||
@ -1734,7 +1735,7 @@ sub generate_matrix() {
|
|||||||
my @temp_zones;
|
my @temp_zones;
|
||||||
|
|
||||||
ZONE1:
|
ZONE1:
|
||||||
for my $zone1 ( non_firewall_zones ) {
|
for my $zone1 ( @zones ) {
|
||||||
my $zone1ref = find_zone( $zone1 );
|
my $zone1ref = find_zone( $zone1 );
|
||||||
my $policy = $filter_table->{"${zone}2${zone1}"}->{policy};
|
my $policy = $filter_table->{"${zone}2${zone1}"}->{policy};
|
||||||
|
|
||||||
@ -1775,7 +1776,7 @@ sub generate_matrix() {
|
|||||||
$last_chain = '';
|
$last_chain = '';
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@dest_zones = non_firewall_zones ;
|
@dest_zones = @zones ;
|
||||||
}
|
}
|
||||||
#
|
#
|
||||||
# Here it is -- THE BIG UGLY!!!!!!!!!!!!
|
# Here it is -- THE BIG UGLY!!!!!!!!!!!!
|
||||||
|
Loading…
x
Reference in New Issue
Block a user