From bfe364e18364cdd9a1cb6fa545a3240c93a33c83 Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Tue, 20 Dec 2016 21:50:29 +0100 Subject: tools: do not use AI_ADDRCONFIG Some people run wg(8) using hard coded v6 addresses before interfaces have v6 addresses, causing getaddrinfo to fail. Since AI_ADDRCONFIG doesn't actualy change the sorting, but just the queries made, we don't really need AI_ADDRCONFIG anyway, since we're always only taking the first result. Reported-by: Benedikt Morbach --- src/tools/config.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/tools/config.c') diff --git a/src/tools/config.c b/src/tools/config.c index 52acc78..50bc97c 100644 --- a/src/tools/config.c +++ b/src/tools/config.c @@ -128,8 +128,7 @@ static inline bool parse_endpoint(struct sockaddr_storage *endpoint, const char struct addrinfo hints = { .ai_family = AF_UNSPEC, .ai_socktype = SOCK_DGRAM, - .ai_protocol = IPPROTO_UDP, - .ai_flags = AI_ADDRCONFIG + .ai_protocol = IPPROTO_UDP }; if (!strlen(value)) { free(mutable); -- cgit v1.2.3-59-g8ed1b