mirror of
https://gitlab.com/shorewall/code.git
synced 2025-01-12 00:28:12 +01:00
Detect missing, NIL or ALL server IP address in a DNAT rule.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
5ca3b795fc
commit
69f6149d4c
@ -704,13 +704,13 @@ sub handle_nat_rule( $$$$$$$$$$$$ ) {
|
|||||||
validate_range( $addr1, $addr2 );
|
validate_range( $addr1, $addr2 );
|
||||||
$server = join( '-', $addr1, $addr2 );
|
$server = join( '-', $addr1, $addr2 );
|
||||||
}
|
}
|
||||||
|
} elsif ( $server eq ALLIP || $server eq NILIP ) {
|
||||||
|
fatal_error "Invalid or missing server IP address";
|
||||||
} else {
|
} else {
|
||||||
unless ( $server eq ALLIP ) {
|
|
||||||
$server = $1 if $family == F_IPV6 && $server =~ /^\[(.+)\]$/;
|
$server = $1 if $family == F_IPV6 && $server =~ /^\[(.+)\]$/;
|
||||||
my @servers = validate_address $server, 1;
|
my @servers = validate_address $server, 1;
|
||||||
$server = join ',', @servers;
|
$server = join ',', @servers;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if ( $action eq 'DNAT' ) {
|
if ( $action eq 'DNAT' ) {
|
||||||
$target = $action;
|
$target = $action;
|
||||||
|
Loading…
Reference in New Issue
Block a user