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,