Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 15 Jul 2014 16:06:48 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-doc@FreeBSD.org
Subject:   [Bug 189268] 3 getaddrinfo(3) - hostanme="localhost", but it returns IN_ADDR_ANY (0.0.0.0)
Message-ID:  <bug-189268-9-1sNmk8EVUt@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-189268-9@https.bugs.freebsd.org/bugzilla/>
References:  <bug-189268-9@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=189268

--- Comment #11 from dreamcat4@gmail.com ---
(In reply to Benjamin Kaduk from comment #10)
> I think you are looking at the /usr/include/sys/socket.h from an OS X
> machine, not a FreeBSD machine.  On my FreeBSD machine, AF_INET6 is decimal
> 28, matching the 0x1c you see.

Yes. Oh sorry! Been looking in the wrong window. Silly me.

And my test program should be:

  if ( (addrinfo) && (addrinfo->ai_family == hints.ai_family) )
                                             ^^^^^^^^^^^^^^^ 
in order to filter on the same requested / returned type.                       

Gist link is updated to reflect that,
https://gist.github.com/dreamcat4/86706bba25c468fc0ecc


BTW

This bug I have observed on FreeBSD 9.2-RELEASE. It is also suspected to occur
on 9.3, 10.0, and high. I just don't have any newer FreeBSD servers to test it
on. Can check on them by running this program 'test.c'.

-- 
You are receiving this mail because:
You are the assignee for the bug.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-189268-9-1sNmk8EVUt>