Allow hostnames in offline, online and burst commands

This commit is contained in:
Miroslav Lichvar
2013-06-05 10:00:36 +02:00
parent 32bf32e7d5
commit 79811bf3e2
2 changed files with 22 additions and 5 deletions

View File

@@ -256,9 +256,12 @@ read_mask_address(char *line, IPAddr *mask, IPAddr *address)
}
}
} else {
if (UTI_StringToIP(p, address)) {
if (DNS_Name2IPAddress(p, address) == DNS_Success) {
bits_to_mask(-1, address->family, mask);
return 1;
} else {
fprintf(stderr, "Could not get address for hostname\n");
return 0;
}
}
}