From a488f1b08492e6bb6e6d23251e57edc5ba5616b2 Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Tue, 20 Dec 2016 21:50:29 +0100 Subject: [PATCH] wg: 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 Signed-off-by: Jason A. Donenfeld --- src/config.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/config.c b/src/config.c index 52acc78..50bc97c 100644 --- a/src/config.c +++ b/src/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);