From b9bed001239c4c1f2db3ee591b495ac89a1c9793 Mon Sep 17 00:00:00 2001 From: Tom Eastep Date: Thu, 31 Mar 2016 12:52:30 -0700 Subject: [PATCH] Correct handling of a physical name in a masq rule Signed-off-by: Tom Eastep --- Shorewall/Perl/Shorewall/Nat.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Shorewall/Perl/Shorewall/Nat.pm b/Shorewall/Perl/Shorewall/Nat.pm index 24f11370a..e9ce87f63 100644 --- a/Shorewall/Perl/Shorewall/Nat.pm +++ b/Shorewall/Perl/Shorewall/Nat.pm @@ -173,7 +173,9 @@ sub process_one_masq1( $$$$$$$$$$$ ) fatal_error "Unknown interface ($interface)" unless my $interfaceref = known_interface( $interface ); - unless ( $interfaceref->{root} ) { + if ( $interfaceref->{root} ) { + $interface = $interfaceref->{name} if $interface eq $interfaceref->{physical}; + } else { $rule .= match_dest_dev( $interface ); $interface = $interfaceref->{name}; }