mirror of
https://gitlab.com/shorewall/code.git
synced 2025-06-24 19:51:40 +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};
|
||||
|
||||
if ( $type2 == VSERVER ) {
|
||||
my $dest_hosts_ref = $z2ref->{hosts};
|
||||
|
||||
for my $typeref ( values %{$dest_hosts_ref} ) {
|
||||
for my $hostref ( @{$typeref->{'%vserver%'}} ) {
|
||||
for my $hostref ( @{$z2ref->{hosts}{ip}{'%vserver%'}} ) {
|
||||
my $exclusion = dest_exclusion( $hostref->{exclusions}, $chain);
|
||||
|
||||
for my $net ( @{$hostref->{hosts}} ) {
|
||||
@ -1691,7 +1688,6 @@ sub generate_dest_rules( $$$$ ) {
|
||||
join('', $match, match_dest_net( $net ) ) )
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
add_jump( $chainref, $chain, 0, $match );
|
||||
}
|
||||
@ -1708,10 +1704,7 @@ sub generate_source_rules( $$$$ ) {
|
||||
#
|
||||
# Not a CONTINUE policy with no rules
|
||||
#
|
||||
my $source_hosts_ref = defined_zone( $z1 )->{hosts};
|
||||
|
||||
for my $typeref ( values %{$source_hosts_ref} ) {
|
||||
for my $hostref ( @{$typeref->{'%vserver%'}} ) {
|
||||
for my $hostref ( @{defined_zone( $z1 )->{hosts}{ip}{'%vserver%'}} ) {
|
||||
my $ipsec_match = match_ipsec_in $z1 , $hostref;
|
||||
my $exclusion = source_exclusion( $hostref->{exclusions}, $chain);
|
||||
|
||||
@ -1724,7 +1717,6 @@ sub generate_source_rules( $$$$ ) {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#
|
||||
|
Loading…
x
Reference in New Issue
Block a user