mirror of
https://gitlab.com/shorewall/code.git
synced 2025-06-25 04:01:45 +02:00
Simplify logic in loopback helper functions
This commit is contained in:
parent
8d5f04d5a5
commit
9eca7fb37b
@ -1678,10 +1678,7 @@ sub generate_dest_rules( $$$$ ) {
|
|||||||
my $type2 = $z2ref->{type};
|
my $type2 = $z2ref->{type};
|
||||||
|
|
||||||
if ( $type2 == VSERVER ) {
|
if ( $type2 == VSERVER ) {
|
||||||
my $dest_hosts_ref = $z2ref->{hosts};
|
for my $hostref ( @{$z2ref->{hosts}{ip}{'%vserver%'}} ) {
|
||||||
|
|
||||||
for my $typeref ( values %{$dest_hosts_ref} ) {
|
|
||||||
for my $hostref ( @{$typeref->{'%vserver%'}} ) {
|
|
||||||
my $exclusion = dest_exclusion( $hostref->{exclusions}, $chain);
|
my $exclusion = dest_exclusion( $hostref->{exclusions}, $chain);
|
||||||
|
|
||||||
for my $net ( @{$hostref->{hosts}} ) {
|
for my $net ( @{$hostref->{hosts}} ) {
|
||||||
@ -1691,7 +1688,6 @@ sub generate_dest_rules( $$$$ ) {
|
|||||||
join('', $match, match_dest_net( $net ) ) )
|
join('', $match, match_dest_net( $net ) ) )
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
add_jump( $chainref, $chain, 0, $match );
|
add_jump( $chainref, $chain, 0, $match );
|
||||||
}
|
}
|
||||||
@ -1708,10 +1704,7 @@ sub generate_source_rules( $$$$ ) {
|
|||||||
#
|
#
|
||||||
# Not a CONTINUE policy with no rules
|
# Not a CONTINUE policy with no rules
|
||||||
#
|
#
|
||||||
my $source_hosts_ref = defined_zone( $z1 )->{hosts};
|
for my $hostref ( @{defined_zone( $z1 )->{hosts}{ip}{'%vserver%'}} ) {
|
||||||
|
|
||||||
for my $typeref ( values %{$source_hosts_ref} ) {
|
|
||||||
for my $hostref ( @{$typeref->{'%vserver%'}} ) {
|
|
||||||
my $ipsec_match = match_ipsec_in $z1 , $hostref;
|
my $ipsec_match = match_ipsec_in $z1 , $hostref;
|
||||||
my $exclusion = source_exclusion( $hostref->{exclusions}, $chain);
|
my $exclusion = source_exclusion( $hostref->{exclusions}, $chain);
|
||||||
|
|
||||||
@ -1724,7 +1717,6 @@ sub generate_source_rules( $$$$ ) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
|
Loading…
x
Reference in New Issue
Block a user