Red Hat Bugzilla – Bug 252139
getnameinfo does not support ipv6
Last modified: 2007-11-30 17:12:13 EST
Description of problem:
As in title. See output of attached test program.
Version-Release number of selected component (if applicable):
I've seen this problem on fully updated FC6, on F7 and CENTOS5
(this means RHEL5 is affected).
Reproducible on both i386 and x86_64.
Created attachment 161256 [details]
getnameinfo test program
User error. You should pass a->ai_addrlen as second argument to getnameinfo,
sizeof (*a->ai_addr) is big enough for IPv4, but not for IPv6.
sizeof (struct sockaddr) == sizeof (struct sockaddr_in) == 16,
but sizeof (struct sockaddr_in6) == 28 and some other struct sockaddr_* are