[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Bogus getaddrinfo(3) on Darwin 9.2.2
From: |
Simon Josefsson |
Subject: |
Re: Bogus getaddrinfo(3) on Darwin 9.2.2 |
Date: |
Tue, 16 Feb 2010 19:58:28 +0100 |
User-agent: |
Gnus/5.110011 (No Gnus v0.11) Emacs/23.1 (gnu/linux) |
address@hidden (Ludovic Courtès) writes:
> What I meant to say is that it should return an error because resolving
> the ‘does-not-exist’ service fails.
Does it only fail (well, falsely succeed) for unknown services?
> The key piece of info here is port = 0, which makes no sense.
Right, although I don't see a requirement in the getaddrinfo
documentation to fail if the service is not known, nor what it actually
means for a service to be "known" at all.
>>> If it is indeed a bug, should we try to work around it in Gnulib?
>>> Any idea how this could be done?
>>
>> Given that this is a bug (which isn't clear to me yet), we could work
>> around it.
>
> I agree in principle, of course, but I can’t think of a way to work
> around that since we’ll always have to rely on libc at one point or
> another.
It should be possible to look up services in other ways (getservbyname),
right? If you use the getaddrinfo replacement in gnulib on that system,
doesn't it produce correct results?
>> But it is also not clear to me that the test-case above indicate a
>> useful way of using getaddrinfo, what kind of application uses
>> parameters like that, and what result did you expect?
>
> An error, because the service name doesn’t resolve.
What if the system is configured (or programmed) to resolve all services
names? Isn't that a valid POSIX compliant getaddrinfo implementation?
It's not particular useful one, I admit.
/Simon
Re: Bogus getaddrinfo(3) on Darwin 9.2.2, Ludovic Courtès, 2010/02/16
Re: Bogus getaddrinfo(3) on Darwin 9.2.2, Paolo Bonzini, 2010/02/17