]> git.ipfire.org Git - thirdparty/wireguard-tools.git/commitdiff
wg: do not use AI_ADDRCONFIG
authorJason A. Donenfeld <Jason@zx2c4.com>
Tue, 20 Dec 2016 20:50:29 +0000 (21:50 +0100)
committerJason A. Donenfeld <Jason@zx2c4.com>
Fri, 23 Dec 2016 20:09:23 +0000 (21:09 +0100)
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 <benedikt.morbach@googlemail.com>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
src/config.c

index 52acc7816c42cde507e7ee2f81f649a50b37223b..50bc97c7de3efdfb2475811f20dbfa59b7b4952e 100644 (file)
@@ -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);