This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: nonstandard SA_LEN() macro
On/Dnia Fri, Jan 26, 2001 at 05:33:00PM -0500, Roland McGrath wrote/napisał(a)
> Something to realize is that programs never really need to set the sa_len
> member to anything. On the 4.4BSD-derived systems that have sa_len, it is
> set by the kernel in returned sockaddrs, but never examined in a sockaddr
> coming from the user.
So try to do getnameinfo() call on user filled sockaddr without
filling sa_len memeber. It will fail because there is check (kame libinet6):
#ifdef HAVE_SA_LEN /*XXX*/
if (sa->sa_len != salen)
return ENI_SALEN;
#endif
But generaly such check is bad thing because we need to check (in user apps)
if system have sa_len (and fill it) or not (more autoconf stuff etc).
But generaly it isn't glibc problem 8)
--
Arkadiusz Miśkiewicz, AM2-6BONE [ PLD GNU/Linux IPv6 ]
http://www.t17.ds.pwr.wroc.pl/~misiek/ipv6/ [ enabled ]