From 79b5cb49dfe81df4290d077058d73b228cc12811 Mon Sep 17 00:00:00 2001 From: Tom Eastep Date: Mon, 9 Nov 2009 12:38:00 -0800 Subject: [PATCH] Fix over-zealous use of physical name; Correct syntax errors --- Shorewall/Perl/Shorewall/Nat.pm | 2 +- Shorewall/Perl/Shorewall/Zones.pm | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Shorewall/Perl/Shorewall/Nat.pm b/Shorewall/Perl/Shorewall/Nat.pm index 9a66e488b..ac77c9fea 100644 --- a/Shorewall/Perl/Shorewall/Nat.pm +++ b/Shorewall/Perl/Shorewall/Nat.pm @@ -220,7 +220,7 @@ sub process_one_masq( ) if ( $addresses =~ /^SAME/ ) { fatal_error "The SAME target is no longer supported"; } elsif ( $addresses eq 'detect' ) { - my $variable = get_interface_address $interfaceref->{physical}; + my $variable = get_interface_address $interface; $target = "-j SNAT --to-source $variable"; if ( interface_is_optional $interface ) { diff --git a/Shorewall/Perl/Shorewall/Zones.pm b/Shorewall/Perl/Shorewall/Zones.pm index f58f53c8a..cfdad21d5 100644 --- a/Shorewall/Perl/Shorewall/Zones.pm +++ b/Shorewall/Perl/Shorewall/Zones.pm @@ -909,7 +909,7 @@ sub process_interface( $ ) { if ( $netsref eq 'dynamic' ) { my $ipset = "${zone}_" . chain_base $physical; - $nets = [ "+$ipset" ]; + $netsref = [ "+$ipset" ]; $ipsets{$ipset} = 1; } @@ -936,8 +936,8 @@ sub process_interface( $ ) { }; if ( $zone ) { - $nets ||= [ allip ]; - add_group_to_zone( $zone, $zoneref->{type}, $interface, $nets, $hostoptionsref ); + $netsref ||= [ allip ]; + add_group_to_zone( $zone, $zoneref->{type}, $interface, $netsref, $hostoptionsref ); add_group_to_zone( $zone, $zoneref->{type}, $interface,