Back out the rest of the original change for dup / -[psiod]

Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
Tom Eastep 2010-05-03 09:59:25 -07:00
parent 70c6a2cdf3
commit c7848be266

View File

@ -390,10 +390,8 @@ sub do_one_nat( $$$$$ )
add_nat_rule 'nat_in' , "-d $external $policyin -j DNAT --to-destination $internal";
add_nat_rule 'nat_out' , "-s $internal $policyout -j SNAT --to-source $external";
} else {
my $chainref = input_chain( $interface );
add_nat_rule $chainref , $rulein . "-d $external $policyin -j DNAT --to-destination $internal";
$chainref = output_chain( $interface );
add_nat_rule $chainref , $ruleout . "-s $internal $policyout -j SNAT --to-source $external";
add_nat_rule input_chain( $interface ) , $rulein . "-d $external $policyin -j DNAT --to-destination $internal";
add_nat_rule output_chain( $interface ) , $ruleout . "-s $internal $policyout -j SNAT --to-source $external";
}
add_nat_rule 'OUTPUT' , "-d $external $policyout -j DNAT --to-destination $internal " if $localnat;
@ -467,11 +465,9 @@ sub setup_netmap() {
}
if ( $type eq 'DNAT' ) {
my $chainref = ensure_chain( 'nat' , input_chain $interface );
add_rule $chainref , $rulein . "-d $net1 -j NETMAP --to $net2";
add_rule ensure_chain( 'nat' , input_chain $interface ) , $rulein . "-d $net1 -j NETMAP --to $net2";
} elsif ( $type eq 'SNAT' ) {
my $chainref = ensure_chain( 'nat' , output_chain $interface );
add_rule $chainref , $ruleout . "-s $net1 -j NETMAP --to $net2";
add_rule ensure_chain( 'nat' , output_chain $interface ) , $ruleout . "-s $net1 -j NETMAP --to $net2";
} else {
fatal_error "Invalid type ($type)";
}