mirror of
https://gitlab.com/shorewall/code.git
synced 2024-11-24 00:23:28 +01:00
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