mirror of
https://gitlab.com/shorewall/code.git
synced 2024-11-08 08:44:05 +01:00
Correct NONAT translation
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
1a06765d14
commit
ae9b57d854
@ -225,7 +225,7 @@ sub process_one_masq1( $$$$$$$$$$$$ )
|
|||||||
} elsif ( $addresses eq 'NONAT' ) {
|
} elsif ( $addresses eq 'NONAT' ) {
|
||||||
fatal_error "'persistent' may not be specified with 'NONAT'" if $persistent;
|
fatal_error "'persistent' may not be specified with 'NONAT'" if $persistent;
|
||||||
fatal_error "'random' may not be specified with 'NONAT'" if $randomize;
|
fatal_error "'random' may not be specified with 'NONAT'" if $randomize;
|
||||||
$target = 'RETURN';
|
$target = $snat ? 'CONTINUE' : 'RETURN';
|
||||||
$add_snat_aliases = 0;
|
$add_snat_aliases = 0;
|
||||||
} elsif ( $addresses ) {
|
} elsif ( $addresses ) {
|
||||||
my $addrlist = '';
|
my $addrlist = '';
|
||||||
@ -397,9 +397,8 @@ sub process_one_masq1( $$$$$$$$$$$$ )
|
|||||||
|
|
||||||
if ( $snat ) {
|
if ( $snat ) {
|
||||||
$target =~ s/ .*//;
|
$target =~ s/ .*//;
|
||||||
$target = 'CONTINUE' if $target eq 'RETURN';
|
|
||||||
$target .= '+' if $pre_nat;
|
$target .= '+' if $pre_nat;
|
||||||
$target .= '(' . $addresses . ')' if $addresses ne '-';
|
$target .= '(' . $addresses . ')' if $addresses ne '-' && $addresses ne 'NONAT';
|
||||||
|
|
||||||
my $line = "$target\t$networks\t$savelist\t$proto\t$ports\t$ipsec\t$mark\t$user\t$condition\t$origdest\t$probability";
|
my $line = "$target\t$networks\t$savelist\t$proto\t$ports\t$ipsec\t$mark\t$user\t$condition\t$origdest\t$probability";
|
||||||
#
|
#
|
||||||
|
Loading…
Reference in New Issue
Block a user