Retry name resolving after temporary failure few times before giving up

This is a temporary fix to allow starting when resolv.conf is not ready yet
(e.g. when using NetworkManager). It may delay start up to 1022 seconds.
This commit is contained in:
Miroslav Lichvar
2008-11-10 14:42:41 +01:00
parent fd2641bcb9
commit 0148ecaea0
4 changed files with 32 additions and 5 deletions

View File

@@ -61,7 +61,7 @@ CPS_ParseNTPSourceAdd(const char *line, CPS_NTP_Source *src)
ok = 0;
if (sscanf(line, "%" SMAXLEN "s%n", hostname, &n) == 1) {
src->ip_addr = DNS_Name2IPAddress(hostname);
src->ip_addr = DNS_Name2IPAddressRetry(hostname);
if (src->ip_addr != DNS_Failed_Address) {
ok = 1;
}