mirror of
https://gitlab.com/shorewall/code.git
synced 2025-06-03 00:15:54 +02:00
Add conditional sorts to find[_zone]_hosts_by_option()
- Another case of different behavior by different Perl versions Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
5e648a9379
commit
42a505c99d
@ -2321,9 +2321,9 @@ sub find_hosts_by_option( $ ) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
for my $zone ( grep ! ( $zones{$_}{type} & FIREWALL ) , @zones ) {
|
for my $zone ( grep ! ( $zones{$_}{type} & FIREWALL ) , @zones ) {
|
||||||
for my $type (keys %{$zones{$zone}{hosts}} ) {
|
for my $type (sortkeysiftest %{$zones{$zone}{hosts}} ) {
|
||||||
my $interfaceref = $zones{$zone}{hosts}->{$type};
|
my $interfaceref = $zones{$zone}{hosts}->{$type};
|
||||||
for my $interface ( keys %$interfaceref ) {
|
for my $interface ( sortkeysiftest %$interfaceref ) {
|
||||||
my $arrayref = $interfaceref->{$interface};
|
my $arrayref = $interfaceref->{$interface};
|
||||||
for my $host ( @{$arrayref} ) {
|
for my $host ( @{$arrayref} ) {
|
||||||
my $ipsec = $host->{ipsec};
|
my $ipsec = $host->{ipsec};
|
||||||
@ -2351,9 +2351,9 @@ sub find_zone_hosts_by_option( $$ ) {
|
|||||||
my @hosts;
|
my @hosts;
|
||||||
|
|
||||||
unless ( $zones{$zone}{type} & FIREWALL ) {
|
unless ( $zones{$zone}{type} & FIREWALL ) {
|
||||||
for my $type (keys %{$zones{$zone}{hosts}} ) {
|
for my $type (sortkeysiftest %{$zones{$zone}{hosts}} ) {
|
||||||
my $interfaceref = $zones{$zone}{hosts}->{$type};
|
my $interfaceref = $zones{$zone}{hosts}->{$type};
|
||||||
for my $interface ( keys %$interfaceref ) {
|
for my $interface ( sortkeysiftest %$interfaceref ) {
|
||||||
my $arrayref = $interfaceref->{$interface};
|
my $arrayref = $interfaceref->{$interface};
|
||||||
for my $host ( @{$arrayref} ) {
|
for my $host ( @{$arrayref} ) {
|
||||||
if ( my $value = $host->{options}{$option} ) {
|
if ( my $value = $host->{options}{$option} ) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user