This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Inconsistency between the Open BSD IP stack and the tests in version 2.0
- From: "Paul Riley" <PRILEY at altera dot com>
- To: <ecos-discuss at sources dot redhat dot com>
- Date: Tue, 17 Aug 2004 17:24:12 +0100
- Subject: [ECOS] Inconsistency between the Open BSD IP stack and the tests in version 2.0
Unless I'm missing something there is an inconsistency between the Open
BSD stack and the io/fileio socket.c test.
It transpires that upon a call to bind then inside the function
in_pcbbind the port entry in the sockaddr_in structure is set to zero,
with the syntax
sin->sin_port = 0; /* yech... */
Why?
In addition this breaks the socket test as the subsequent connect is now
connecting to a port which is zero and this barfs. Now it's easy to fix
the test so that the port is set after the call to bind, however that
feels wrong. Does anyone know why this is zero'd out?
Thanks,
Paul
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss