From 73eab1fa5567ca08bba75e40e15f08436282b01a Mon Sep 17 00:00:00 2001 From: Tom Eastep Date: Fri, 6 Nov 2009 08:40:53 -0800 Subject: [PATCH] Report physical name in zone reports rather than logical name --- Shorewall/Perl/Shorewall/Zones.pm | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/Shorewall/Perl/Shorewall/Zones.pm b/Shorewall/Perl/Shorewall/Zones.pm index 1c9ca3d42..4e34523b8 100644 --- a/Shorewall/Perl/Shorewall/Zones.pm +++ b/Shorewall/Perl/Shorewall/Zones.pm @@ -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 $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 $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>"; } } }