Revert "Use '--to-dest' for IPv6 rather than '--to-destination'"

This reverts commit c9d8c22b60.
This commit is contained in:
Tom Eastep 2013-03-01 10:44:40 -08:00
parent c9d8c22b60
commit 9499a47a0d

View File

@ -714,20 +714,19 @@ sub handle_nat_rule( $$$$$$$$$$$$ ) {
if ( $action eq 'DNAT' ) {
$target = $action;
my $option = $family == F_IPV4 ? '--to-destination' : '--to-dest';
if ( $server ) {
$serverport = ":$serverport" if $serverport;
if ( $family == F_IPV4 ) {
for my $serv ( split /,/, $server ) {
$target .= " $option ${serv}${serverport}";
$target .= " --to-destination ${serv}${serverport}";
}
} else {
for my $serv ( split /,/, $server ) {
$target .= " $option \[${serv}]${serverport}";
$target .= " --to-destination [${serv}]${serverport}";
}
}
} else {
$target .= " $option :$serverport";
$target .= " --to-destination :$serverport";
}
}