forked from extern/shorewall_code
Report physical name in zone reports rather than logical name
This commit is contained in:
parent
d73ebb8a6a
commit
73eab1fa55
@ -502,18 +502,19 @@ sub zone_report()
|
||||
my $interfaceref = $hostref->{$type};
|
||||
|
||||
for my $interface ( sort keys %$interfaceref ) {
|
||||
my $iref = $interfaces{$interface};
|
||||
my $arrayref = $interfaceref->{$interface};
|
||||
for my $groupref ( @$arrayref ) {
|
||||
my $hosts = $groupref->{hosts};
|
||||
my $exclusions = join ',', @{$groupref->{exclusions}};
|
||||
if ( $hosts ) {
|
||||
my $grouplist = join ',', ( @$hosts );
|
||||
my $exclusions = join ',', @{$groupref->{exclusions}};
|
||||
$grouplist = join '!', ( $grouplist, $exclusions) if $exclusions;
|
||||
|
||||
if ( $family == F_IPV4 ) {
|
||||
progress_message_nocompress " $interface:$grouplist";
|
||||
progress_message_nocompress " $iref->{physical}:$grouplist";
|
||||
} else {
|
||||
progress_message_nocompress " $interface:<$grouplist>";
|
||||
progress_message_nocompress " $iref->{physical}:<$grouplist>";
|
||||
}
|
||||
$printed = 1;
|
||||
}
|
||||
@ -560,20 +561,21 @@ sub dump_zone_contents()
|
||||
my $interfaceref = $hostref->{$type};
|
||||
|
||||
for my $interface ( sort keys %$interfaceref ) {
|
||||
my $iref = $interfaces{$interface};
|
||||
my $arrayref = $interfaceref->{$interface};
|
||||
for my $groupref ( @$arrayref ) {
|
||||
my $hosts = $groupref->{hosts};
|
||||
my $exclusions = join ',', @{$groupref->{exclusions}};
|
||||
|
||||
if ( $hosts ) {
|
||||
my $grouplist = join ',', ( @$hosts );
|
||||
my $exclusions = join ',', @{$groupref->{exclusions}};
|
||||
|
||||
$grouplist = join '!', ( $grouplist, $exclusions ) if $exclusions;
|
||||
|
||||
if ( $family == F_IPV4 ) {
|
||||
$entry .= " $interface:$grouplist";
|
||||
$entry .= " $iref->{physical}:$grouplist";
|
||||
} else {
|
||||
$entry .= " $interface:<$grouplist>";
|
||||
$entry .= " $iref->{physical}:<$grouplist>";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user