Allow physical interface to work in the ecn file.

Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
Tom Eastep 2016-04-01 15:10:49 -07:00
parent d98305c6f4
commit f22e8d6d55

View File

@ -89,6 +89,7 @@ sub setup_ecn()
{
my %interfaces;
my @hosts;
my $interfaceref;
if ( my $fn = open_file 'ecn' ) {
@ -105,7 +106,13 @@ sub setup_ecn()
2 );
fatal_error 'INTERFACE must be specified' if $interface eq '-';
fatal_error "Unknown interface ($interface)" unless known_interface $interface;
fatal_error "Unknown interface ($interface)" unless $interfaceref = known_interface( $interface );
if ( $interfaceref->{root} ) {
$interface = $interfaceref->{name} if $interface eq $interfaceref->{physical};
} else {
$interface = $interfaceref->{name};
}
my $lineinfo = shortlineinfo( '' );