From b637d303b9c4cf9022f8098f10eb48ec2e6abd2c Mon Sep 17 00:00:00 2001 From: Tom Eastep Date: Sat, 2 Apr 2016 17:27:20 -0700 Subject: [PATCH] Correct use of a physical interface name in the hosts file. Signed-off-by: Tom Eastep --- Shorewall/Perl/Shorewall/Zones.pm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Shorewall/Perl/Shorewall/Zones.pm b/Shorewall/Perl/Shorewall/Zones.pm index 2125ce1db..315675bd5 100644 --- a/Shorewall/Perl/Shorewall/Zones.pm +++ b/Shorewall/Perl/Shorewall/Zones.pm @@ -2049,6 +2049,7 @@ sub process_host( ) { $interface = $1; $hosts = $2; fatal_error "Unknown interface ($interface)" unless ($interfaceref = $interfaces{$interface}) && $interfaceref->{root}; + $interface = $interfaceref->{name}; } else { fatal_error "Invalid HOST(S) column contents: $hosts"; } @@ -2063,6 +2064,8 @@ sub process_host( ) { fatal_error "Unknown interface ($interface)" unless ($interfaceref = $interfaces{$interface}) && $interfaceref->{root}; fatal_error "Unmanaged interfaces may not be associated with a zone" if $interfaceref->{unmanaged}; + $interface = $interfaceref->{name}; + if ( $interfaceref->{physical} eq $loopback_interface ) { fatal_error "Only a loopback zone may be associated with the loopback interface ($loopback_interface)" if $type != LOOPBACK; } else {