13 log_warn(
"NULL hostname provided to DNS connectivity test");
17 struct addrinfo hints, *result = NULL;
18 memset(&hints, 0,
sizeof(hints));
19 hints.ai_family = AF_INET;
20 hints.ai_socktype = SOCK_STREAM;
22 log_debug(
"Testing DNS connectivity to %s...", hostname);
24 int ret = getaddrinfo(hostname,
"443", &hints, &result);
26 log_warn(
"DNS resolution failed for %s: %s", hostname, gai_strerror(ret));
34 log_debug(
"DNS connectivity test succeeded for %s", hostname);