From f22e8d6d5534058eb6343fbbd56c249156e98058 Mon Sep 17 00:00:00 2001 From: Tom Eastep Date: Fri, 1 Apr 2016 15:10:49 -0700 Subject: [PATCH] Allow physical interface to work in the ecn file. Signed-off-by: Tom Eastep --- Shorewall/Perl/Shorewall/Misc.pm | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Shorewall/Perl/Shorewall/Misc.pm b/Shorewall/Perl/Shorewall/Misc.pm index d0c49bb84..92d786936 100644 --- a/Shorewall/Perl/Shorewall/Misc.pm +++ b/Shorewall/Perl/Shorewall/Misc.pm @@ -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( '' );