Merge pull request #428 from themiron/old-uclibc-fix

Optimize local addresses enumeration with old uClibc
This commit is contained in:
wtoorop 2019-04-25 09:52:28 +02:00 committed by GitHub
commit 994466b3de
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View File

@ -1161,7 +1161,7 @@ getdns_context_set_resolvconf(getdns_context *context, const char *resolvconf)
memset(&hints, 0, sizeof(struct addrinfo));
hints.ai_family = AF_UNSPEC; /* Allow IPv4 or IPv6 */
hints.ai_socktype = 0; /* Datagram socket */
hints.ai_socktype = SOCK_DGRAM; /* Datagram socket */
hints.ai_flags = AI_NUMERICHOST; /* No reverse name lookups */
hints.ai_protocol = 0; /* Any protocol */
hints.ai_canonname = NULL;
@ -2736,7 +2736,7 @@ getdns_context_set_upstream_recursive_servers(struct getdns_context *context,
}
memset(&hints, 0, sizeof(struct addrinfo));
hints.ai_family = AF_UNSPEC; /* Allow IPv4 or IPv6 */
hints.ai_socktype = 0; /* Datagram socket */
hints.ai_socktype = SOCK_DGRAM; /* Datagram socket */
hints.ai_flags = AI_NUMERICHOST; /* No reverse name lookups */
hints.ai_protocol = 0; /* Any protocol */
hints.ai_canonname = NULL;

View File

@ -978,6 +978,7 @@ getdns_return_t getdns_context_set_listen_addresses(
(void) memset(&hints, 0, sizeof(struct addrinfo));
hints.ai_family = AF_UNSPEC;
hints.ai_socktype = SOCK_DGRAM;
hints.ai_flags = AI_NUMERICHOST;
for (i = 0; !r && i < new_set_count; i++) {