Re: getaddrinfo() does not behave as expected!



Alex Zhilyakov <az@xxxxxxxxxxxxx> wrote:
There is nothing to patch in S8. If your application supports both
IPv4 and IPv6, then you shouldn't care which of 127.1 or ::1 you get.
If your application supports IPv4 only, then you must use PF_INET
in getaddrinfo().

My take is that while the application may support both v4 and v6 and be
able to use both, it is common for a Solaris 8 machine to not answer on
::1 (no IPv6 configuration), yet getaddrinfo would still return ::1 for
localhost.

So you have a valid name and get a valid (IPv6) address, but nothing is
listening...

# ping -ns ::1
ping: unknown host ::1
#

And that he wants ::1 to not be returned when the machine is not
configured for IPv6 and isn't communicating on that address.

I would presume that it may be correct to continue and try other
returned addresses in case the first one fails, but that's a guess.

--
Darren Dunham ddunham@xxxxxxxx
Senior Technical Consultant TAOS http://www.taos.com/
Got some Dr Pepper? San Francisco, CA bay area
< This line left intentionally blank to confuse you. >
.



Relevant Pages

  • Re: [opensuse] how many folks running suse 11 are heavily into IPv6?
    ... There is just no reason not to begin phasing out IPv4. ... might be on IPv6 only addresses, ... provider does not have the skills required to support me/my company. ...
    (SuSE)
  • Re: is a NAT device/home router - a router?
    ... Monopolies considerably easier. ... There are a couple of things driving IPv6. ... addresses in IPv4. ... headers make it easier to support new protocols etc. ...
    (comp.dcom.lans.ethernet)
  • Re: [fw-wiz] IPv6 and IPSec
    ... > require IPSec? ... And "support" can be a nebulus thing. ... all of IPv4 in toto. ... And something like 40 million IPv6 networks are routable in the ...
    (Firewall-Wizards)
  • Re: turning off IPv6
    ... IPv4 should be disabled out of the box. ... I presume you mean IPv6! ... that the providers don't support anything else and that it ... - I haven't seen any actual data to support that. ...
    (Ubuntu)
  • New C++ sockets library
    ... I've created a new C++ sockets library - small, cross-platform, IPv4 ... and IPv6. ... If anyone would like to critique it, ... Doesn't support the more exotic protocols - only TCP and UDP. ...
    (comp.lang.cpp)

Quantcast