aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/config.c
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2016-12-20 21:50:29 +0100
committerJason A. Donenfeld <Jason@zx2c4.com>2016-12-23 21:09:23 +0100
commita488f1b08492e6bb6e6d23251e57edc5ba5616b2 (patch)
tree3acf244b6ca7ebc040324aea3d8005576fb00a3c /src/config.c
parentwg: allowed-ips is easier to parse with spaces instead of ", " (diff)
downloadwireguard-tools-a488f1b08492e6bb6e6d23251e57edc5ba5616b2.tar.xz
wireguard-tools-a488f1b08492e6bb6e6d23251e57edc5ba5616b2.zip
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 <benedikt.morbach@googlemail.com> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'src/config.c')
-rw-r--r--src/config.c3
1 files changed, 1 insertions, 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);