nameserv: request SOCK_DGRAM socktype
Specify SOCK_DGRAM socktype instead of SOCK_STREAM in hints for getaddrinfo() as chronyd is (and will mainly be) using the returned addresses to open UDP sockets. This shouldn't make a difference in practice, but it might avoid some confusion.
This commit is contained in:
parent
9e7a7008de
commit
d30e73d0d9
1 changed files with 1 additions and 1 deletions
|
@ -69,7 +69,7 @@ DNS_Name2IPAddress(const char *name, IPAddr *ip_addrs, int max_addrs)
|
|||
default:
|
||||
hints.ai_family = AF_UNSPEC;
|
||||
}
|
||||
hints.ai_socktype = SOCK_STREAM;
|
||||
hints.ai_socktype = SOCK_DGRAM;
|
||||
|
||||
result = getaddrinfo(name, NULL, &hints, &res);
|
||||
|
||||
|
|
Loading…
Reference in a new issue