git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@5567 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
teastep 2007-03-18 17:57:37 +00:00
parent f136f6c26d
commit d97ef334ed

View File

@ -164,19 +164,28 @@ sub setup_one_masq($$$$$$)
# Handle Protocol and Ports
#
$rule .= do_proto $proto, $ports, '';
#
# Do we need to detect the source addresses at run-time?
#
my $detectinterface = '';
unless ( $networks =~ /.*\..*\./ ) {
$detectinterface = $networks;
$networks = '';
}
#
# Parse the ADDRESSES column
#
if ( $addresses ) {
if ( $addresses =~ /^SAME:nodst:/ ) {
$target = '-j SAME ';
$target = '-j SAME --nodst';
$addresses =~ s/.*://;
for my $addr ( split /,/, $addresses ) {
$target .= "--to $addr ";
}
} elsif ( $addresses =~ /^SAME:nodst:/ ) {
$target = '-j SAME --nodst ';
$target = '-j SAME ';
$addresses =~ s/.*://;
for my $addr ( split /,/, $addresses ) {
$target .= "--to $addr ";