From 5ee80f1a7a07eac257e497833c9db58ee5d8ba3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sa=C3=BAl=20Ibarra=20Corretg=C3=A9?= Date: Thu, 28 Jun 2012 08:48:54 +0200 Subject: [PATCH] c-ares: ignore rogue DNS servers reported by windows --- src/ares/ares_init.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/ares/ares_init.c b/src/ares/ares_init.c index f9eb05450..4aef21ad4 100644 --- a/src/ares/ares_init.c +++ b/src/ares/ares_init.c @@ -1012,6 +1012,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(txtaddr, "fec0:0:0:ffff:", 14) == 0) + continue; if (memcmp(&namesrvr.sa6->sin6_addr, &ares_in6addr_any, sizeof(namesrvr.sa6->sin6_addr)) == 0) continue;