Convert DNS names into ip addresses in validate_net().

Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
Tom Eastep 2013-01-13 07:39:27 -08:00
parent 853b9ce916
commit 90bd19feb9

View File

@ -202,7 +202,7 @@ sub validate_4net( $$ ) {
fatal_error "Invalid IP address ($net)" unless valid_4address $net;
} else {
fatal_error "Invalid Network address ($_[0])" if $_[0] =~ '/' || ! defined $net;
validate_4address $net, $_[1];
$net = validate_4address $net, $_[1];
$vlsm = 32;
}
@ -635,7 +635,7 @@ sub validate_6net( $$ ) {
fatal_error "Invalid IPv6 address ($net)" unless valid_6address $net;
} else {
fatal_error "Invalid Network address ($_[0])" if $_[0] =~ '/';
validate_6address $net, $allow_name;
net = validate_6address $net, $allow_name;
$vlsm = 128;
}