This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [RFC PATCH] getaddrinfo: Force name resolution for AI_CANONNAME [BZ# 24182]
- From: Florian Weimer <fweimer at redhat dot com>
- To: "Heitor R. Alves de Siqueira" <halves at canonical dot com>
- Cc: libc-alpha at sourceware dot org, Dan Streetman <dan dot streetman at canonical dot com>
- Date: Sat, 09 Feb 2019 10:15:25 +0100
- Subject: Re: [RFC PATCH] getaddrinfo: Force name resolution for AI_CANONNAME [BZ# 24182]
- References: <20190208175245.2314-1-halves@canonical.com>
* Heitor R. Alves de Siqueira:
> This patch forces name resolution if the AI_CANONNAME flag is set. Even
> if inet_aton_exact() identifies the input name as being a valid IPv4
> address, we will try name resolution in case it's a valid hostname. If
> no hostname is found after resolution, the input name is still copied
> to the ai_canonname field.
This is not correct because it sends queries for names such as 192.0.2.1
to the DNS root servers.
I'm sorry, but I still don't see how the general idea is useful. Which
applications benefit if getaddrinfo returns in ai_canonname which will
most likely resolve to a completely different set of addresses?
Do you have a bug report that requests a behavior change in this area?
Which problem is this trying to address?
Thanks,
Florian