From 0174045181a3e0834c8426b4bbac829c49fddf61 Mon Sep 17 00:00:00 2001 From: Tom Eastep Date: Sat, 31 Jul 2010 10:49:49 -0700 Subject: [PATCH] Fixes for Universal Sample --- Shorewall/Perl/Shorewall/Chains.pm | 4 ++-- Shorewall/Perl/Shorewall/Rules.pm | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Shorewall/Perl/Shorewall/Chains.pm b/Shorewall/Perl/Shorewall/Chains.pm index 73f2d9b1d..59b51b70a 100644 --- a/Shorewall/Perl/Shorewall/Chains.pm +++ b/Shorewall/Perl/Shorewall/Chains.pm @@ -2418,9 +2418,9 @@ sub do_length( $ ) { # sub match_source_dev( $ ) { my $interface = shift; - return '' if $interface eq '+'; my $interfaceref = known_interface( $interface ); $interface = $interfaceref->{physical} if $interfaceref; + return '' if $interface eq '+'; if ( $interfaceref && $interfaceref->{options}{port} ) { "-i $interfaceref->{bridge} -m physdev --physdev-in $interface "; } else { @@ -2433,9 +2433,9 @@ sub match_source_dev( $ ) { # sub match_dest_dev( $ ) { my $interface = shift; - return '' if $interface eq '+'; my $interfaceref = known_interface( $interface ); $interface = $interfaceref->{physical} if $interfaceref; + return '' if $interface eq '+'; if ( $interfaceref && $interfaceref->{options}{port} ) { if ( have_capability( 'PHYSDEV_BRIDGE' ) ) { "-o $interfaceref->{bridge} -m physdev --physdev-is-bridged --physdev-out $interface "; diff --git a/Shorewall/Perl/Shorewall/Rules.pm b/Shorewall/Perl/Shorewall/Rules.pm index a5512c114..d53128dda 100644 --- a/Shorewall/Perl/Shorewall/Rules.pm +++ b/Shorewall/Perl/Shorewall/Rules.pm @@ -1966,7 +1966,7 @@ sub generate_matrix() { for my $interface ( sort { interface_number( $a ) <=> interface_number( $b ) } keys %$typeref ) { my $arrayref = $typeref->{$interface}; - if ( $interface eq '+' ) { + if ( get_physical( $interface ) eq '+' ) { # # Insert the interface-specific jumps before this one which is not interface-specific #