forked from extern/shorewall_code
Revert "Use '--to-dest' for IPv6 rather than '--to-destination'"
This reverts commit c9d8c22b60
.
This commit is contained in:
parent
c9d8c22b60
commit
9499a47a0d
@ -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";
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user