This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: Inconsistency between the Open BSD IP stack and the tests in version 2.0
On Tue, Aug 17, 2004 at 05:24:12PM +0100, Paul Riley wrote:
> Unless I'm missing something there is an inconsistency between the Open
> BSD stack and the io/fileio socket.c test.
Old on a minute. Are you sure we are talking about the OpenBSD stack
here? bsd_bind in the OpenBSD stack is:
static int bsd_bind ( cyg_file *fp, const sockaddr *sa, socklen_t len )
{
struct mbuf *nam;
int error;
error = sockargs(&nam, (caddr_t)sa, len, MT_SONAME);
if (error)
return (error);
error = sobind((struct socket *)fp->f_data, nam);
m_freem(nam);
return error;
}
The call to sockargs makes a copy of the sockaddr which is what is
passed into sobind. So i don't see who the "userspace" value can
change.
The FreeBSD stack however looks like it could have the problem you
describe.
Andrew
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss