More removal of SAME target

Signed-off-by: Tom Eastep <teastep@shorewall.net>

git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@9775 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
teastep 2009-04-01 01:31:16 +00:00
parent dbf23f64e2
commit ef50c0be25

View File

@ -219,7 +219,9 @@ sub setup_one_masq($$$$$$$)
} else {
$addresses =~ s/:random$// and $randomize = '--random ';
if ( $addresses eq 'detect' ) {
if ( $addresses =~ /^SAME/ ) {
fatal_error "The SAME target is no longer supported";
} elsif ( $addresses eq 'detect' ) {
my $variable = get_interface_address $interface;
$target = "-j SNAT --to-source $variable";
@ -238,6 +240,8 @@ sub setup_one_masq($$$$$$$)
for my $addr ( split_list $addresses , 'address' ) {
if ( $addr =~ /^.*\..*\..*\./ ) {
$target = '-j SNAT ';
my ($ipaddr, $rest) = split ':', $addr;
validate_address $ipaddr, 0;
$addrlist .= "--to-source $addr ";
$exceptionrule = do_proto( $proto, '', '' ) if $addr =~ /:/;
} else {