From 34d125f16c77b953d002ab313aa029ac46d83c87 Mon Sep 17 00:00:00 2001 From: Rod Vagg Date: Wed, 15 May 2013 21:25:11 +0200 Subject: [PATCH] deps: c-ares float, win ipv6 bad fec0 prefix Was 72c5458aee: PR-URL: https://github.com/nodejs/node/pull/5090 Reviewed-By: Fedor Indutny Reimplemented for c-ares 1.13.0 PR-URL: https://github.com/nodejs/node/pull/15378 Reviewed-By: James M Snell Reviewed-By: Ruben Bridgewater --- deps/cares/src/ares_init.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/deps/cares/src/ares_init.c b/deps/cares/src/ares_init.c index dbc67ed441f8e2..3ba8cb3570c67d 100644 --- a/deps/cares/src/ares_init.c +++ b/deps/cares/src/ares_init.c @@ -1196,6 +1196,11 @@ static int get_DNS_AdaptersAddresses(char **outptr) } else if (namesrvr.sa->sa_family == AF_INET6) { + /* Windows apparently always reports some IPv6 DNS servers that + * prefixed with fec0:0:0:ffff. These ususally do not point to + * working DNS servers, so we ignore them. */ + if (strncmp(addresses[addressesIndex].text, "fec0:0:0:ffff:", 14) == 0) + continue; if (memcmp(&namesrvr.sa6->sin6_addr, &ares_in6addr_any, sizeof(namesrvr.sa6->sin6_addr)) == 0) continue;