mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-05 20:45:06 -05:00
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:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user