[Bug 189268] 3 getaddrinfo(3) - hostanme="localhost", but it returns IN_ADDR_ANY (0.0.0.0)

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Tue Jul 15 14:22:11 UTC 2014


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=189268

Benjamin Kaduk <bjk at FreeBSD.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bjk at FreeBSD.org

--- Comment #8 from Benjamin Kaduk <bjk at FreeBSD.org> ---
I do not see why it is believed to be correct behavior to blindly cast
addrinfo->ai_addr to type 'struct sockaddr_in *' without first checking that
addrinfo->ai_family is PF_INET (or that the sockaddr's sa_family is AFS_INET);
such a cast is expected to yield "nonsense" results when ai_family is PF_INET6.

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


More information about the freebsd-doc mailing list