This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: getnameinfo from glibc 2.1.94
On Fri, Sep 29, 2000 at 09:15:21AM -0700, Ulrich Drepper wrote:
> Artur Frysiak <wiget@pld.org.pl> writes:
>
> > # ltrace netstat 2>&1|grep getnameinfo
> > getnameinfo(0xbfffd284, 24, 0x0805d4a0, 255, 0) = -1
> > fprintf(0x002359a0, "getnameinfo: %s\n", "Bad value for ai_flags"getnameinfo: Bad value for ai_flags
> >
> > If I use netstat compiled with glibc 2.1.94 then all is fine.
> > # ltrace netstat 2>&1|grep getnameinfo
> > getnameinfo(0xbfffd280, 28, 0x0805c1e0, 255, 0) = 0
> > getnameinfo(0xbfffd280, 28, 0x0805c1e0, 255, 0) = 0
>
>
> The immediate reason for the problem you see is that the sockaddr_in6
> structure changed. Complain the the appropriate working group, they
> added an sin6_scope_id field. getnameinfo() tests for the size of the
> passed-in address structure (the second parameter marks the size) and
> fails if it is too small. You will have to recompile all IPv6 enabled
> programs. I'll add a comment about this in the documentation.
If changing sockaddr_in6 breaks backword compatibility with glibc 2.1.3 of
getnameinfo then maybe ist time to drop getnameinfo(GLIBC_2.1) versioned
symbol and introduce getnameinfo(GLIBC_2.2) ?
Regards
--
Artur Frysiak
http://www.pld.org.pl/