From 438d2a838e45925b733df11ac7cb4126acedfed4 Mon Sep 17 00:00:00 2001 From: Tom Eastep Date: Sun, 3 Apr 2011 13:23:20 -0700 Subject: [PATCH] Correct physical naming and bridges --- Shorewall/Perl/Shorewall/Chains.pm | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Shorewall/Perl/Shorewall/Chains.pm b/Shorewall/Perl/Shorewall/Chains.pm index bc6dea722..e483636f5 100644 --- a/Shorewall/Perl/Shorewall/Chains.pm +++ b/Shorewall/Perl/Shorewall/Chains.pm @@ -2657,7 +2657,9 @@ sub match_source_dev( $ ) { $interface = $interfaceref->{physical} if $interfaceref; return '' if $interface eq '+'; if ( $interfaceref && $interfaceref->{options}{port} ) { - "-i $interfaceref->{bridge} -m physdev --physdev-in $interface "; + my $bridgeref = find_interface $interfaceref->{bridge}; + + "-i $bridgeref->{physical} -m physdev --physdev-in $interface "; } else { "-i $interface "; } @@ -2672,10 +2674,12 @@ sub match_dest_dev( $ ) { $interface = $interfaceref->{physical} if $interfaceref; return '' if $interface eq '+'; if ( $interfaceref && $interfaceref->{options}{port} ) { + my $bridgeref = find_interface $interfaceref->{bridge}; + if ( have_capability( 'PHYSDEV_BRIDGE' ) ) { - "-o $interfaceref->{bridge} -m physdev --physdev-is-bridged --physdev-out $interface "; + "-o $bridgeref->{physical} -m physdev --physdev-is-bridged --physdev-out $interface "; } else { - "-o $interfaceref->{bridge} -m physdev --physdev-out $interface "; + "-o $bridgeref->{physical} -m physdev --physdev-out $interface "; } } else { "-o $interface ";