summaryrefslogtreecommitdiffstatshomepage
path: root/src/tools/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
commitbfe364e18364cdd9a1cb6fa545a3240c93a33c83 (patch)
treeee9b91883ab0763e88e7492ea80f67951e892eb4 /src/tools/config.c
parenttools: allowed-ips is easier to parse with spaces instead of ", " (diff)
downloadwireguard-monolithic-historical-bfe364e18364cdd9a1cb6fa545a3240c93a33c83.tar.xz
wireguard-monolithic-historical-bfe364e18364cdd9a1cb6fa545a3240c93a33c83.zip
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 <benedikt.morbach@googlemail.com>
Diffstat (limited to '')
-rw-r--r--src/tools/config.c3
1 files changed, 1 insertions, 2 deletions
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);