From: Jason A. Donenfeld Date: Tue, 20 Dec 2016 20:50:29 +0000 (+0100) Subject: wg: do not use AI_ADDRCONFIG X-Git-Tag: v1.0.20191226~305 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a488f1b08492e6bb6e6d23251e57edc5ba5616b2;p=thirdparty%2Fwireguard-tools.git 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 --- 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);