mirror of
https://gitlab.com/shorewall/code.git
synced 2025-04-02 20:06:49 +02:00
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:
parent
dbf23f64e2
commit
ef50c0be25
@ -219,7 +219,9 @@ sub setup_one_masq($$$$$$$)
|
|||||||
} else {
|
} else {
|
||||||
$addresses =~ s/:random$// and $randomize = '--random ';
|
$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;
|
my $variable = get_interface_address $interface;
|
||||||
$target = "-j SNAT --to-source $variable";
|
$target = "-j SNAT --to-source $variable";
|
||||||
|
|
||||||
@ -238,6 +240,8 @@ sub setup_one_masq($$$$$$$)
|
|||||||
for my $addr ( split_list $addresses , 'address' ) {
|
for my $addr ( split_list $addresses , 'address' ) {
|
||||||
if ( $addr =~ /^.*\..*\..*\./ ) {
|
if ( $addr =~ /^.*\..*\..*\./ ) {
|
||||||
$target = '-j SNAT ';
|
$target = '-j SNAT ';
|
||||||
|
my ($ipaddr, $rest) = split ':', $addr;
|
||||||
|
validate_address $ipaddr, 0;
|
||||||
$addrlist .= "--to-source $addr ";
|
$addrlist .= "--to-source $addr ";
|
||||||
$exceptionrule = do_proto( $proto, '', '' ) if $addr =~ /:/;
|
$exceptionrule = do_proto( $proto, '', '' ) if $addr =~ /:/;
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user