[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bug#438179: glibc's getaddrinfo() sort order



Clint Adams writes ("Bug#438179: glibc's getaddrinfo() sort order"):
> On Mon, Sep 24, 2007 at 11:18:00AM +0100, Ian Jackson wrote:
> > COMMON BEHAVIOUR ON TODAY'S INTERNET IS THAT IMPLEMENTED BY
> > GETHOSTBYNAME.
> 
> Common behavior for gethostbyname() on today's Internet is that
> implemented commonly in gethostbyname() .

Why do we keep focusing on the function name used by the application ?
>From the point of view of the rest of the internet (eg, the DNS
administrator) that's just an implementation detail.

Is there any evidence anywhere that any application was changed to use
getaddrinfo in order to get rule 9 ?

> > How many times do I have to explain this ?  getaddrinfo is the
> > REPLACEMENT FOR GETHOSTBYNAME.  It is not an interface which
> > applications choose because they want different address sorting
> > behaviour.  It is the interface applications MUST USE TO SUPPORT IPV6.
> 
> I don't think that this is true.  getipnodebyname() is an interface
> applications can use and is much more conducive to drop-in replacement
> given its interface.  I am not recommending use of this function, but
> your leap of logic is strange.

getipnodebyname(3):

 DESCRIPTION
	These functions are deprecated.  Use getaddrinfo(3)
        and getnameinfo(3) instead.

> > Changing applications to use getaddrinfo instead of gethostbyname is
> > done BECAUSE THOSE APPLICATIONS ARE BEING UPDATED TO SUPPORT IPV6.
> 
> I think it's done because it's a better, more standardized interface.

In what way is it better ?  It can support IPv6 !  (It can also
support SRV but this is not hugely relevant in this discussion as few
protocols are actually using SRV in practice, and SRV has its own
rules for which addresses to try in which order.)

And, you say applications are updated because it's a better
_interface_.  Well, yes.  But changing to a different _interface_
doesn't mean that the application is intending to get different
_behaviour_.

> > Updating an application to support IPv6 should not change the way it
> > treats DNS RRsets containing multiple IPv4 addresses.  Obviously.
> 
> Anything assuming what you assume about DNS resolution is going to break
> in the future eventually.

I don't understand what you're getting at here.  Are you referring to
the imminent demise of IPv4 (ha ha) or something else ?

Ian.



Reply to: