"Bert Belder" <bertbelder_at_gmail.com> wrote:
> Given this comment someone must have already been aware of this problem:
> /* NB on Windows this also returns stuff in the fec0::/10 range,
> seems to be hard-coded somehow. Do we need to ignore them? */
>
> This patch makes c-ares actually ignore these rogue servers.
Brilliant! This patch also prevents overflowing 'ret_buf' (and trashing
my stack) in get_iphlpapi_dns_info() as was the case here with IPv6
installed. IPv6 on Win-XP adds 6 additional pseudo adapters each with
3 additional "rouge" DNS-server addresses. And Steinar, these doesn't
come from my DHCP-server. It doesn't grok IPv6. It comes from IPv6
auto-configuration and the 6to4 stuff AFAICS.
With your patch these are gone, but GetAdapterAddresses() still returns a
lot of DNS'es. get_iphlpapi_dns_info() returns this here now:
217.13.4.24
217.13.7.140
217.13.4.140
217.13.4.24
216.131.95.20
216.131.94.5
216.131.95.20
216.131.94.5
217.13.4.24
217.13.7.140
216.131.95.20
216.131.94.5
217.13.4.140
217.13.4.24
I think this list should be trimmed to remove the duplicates.
And what about DNS-server preference? AFAICS now the 1st DNS
server in the 1st adapter just happens to get the highest precedence.
--gv
Received on 2011-10-21