This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Inconsistency between the Open BSD IP stack and the tests in version 2.0


On Tue, Aug 17, 2004 at 05:51:17PM +0100, Paul Riley wrote:
> FreeBSD, I'm trying to get all the regression tests on our architecture,
> but the problem is in both.

You are realy sure it happens with the OpenBSD stack?

Anyway, here is a totally untested patch for the FreeBSD stack. Please
let me know if it works.

        Andrew

Index: net/bsd_tcpip/current/ChangeLog
===================================================================
RCS file: /cvs/ecos/ecos-opt/net/net/bsd_tcpip/current/ChangeLog,v
retrieving revision 1.48
diff -u -r1.48 ChangeLog
--- net/bsd_tcpip/current/ChangeLog     16 Jul 2004 10:43:28 -0000      1.48
+++ net/bsd_tcpip/current/ChangeLog     17 Aug 2004 16:55:24 -0000
@@ -1,3 +1,9 @@
+2004-08-17  Andrew Lunn  <andrew.lunn@ascom.ch>
+
+       * src/sys/kern/sockio.c (bsd_bind): Pass a copy of the sa into
+       bind so that the "kernel" code does not modify the "user" codes
+       version of the socket address.
+
 2004-07-15 Oyvind Harboe <oyvind.harboe@zylin.com>
 
        *cdl/freebsd_net.cdl:
Index: net/bsd_tcpip/current/src/sys/kern/sockio.c
===================================================================
RCS file: /cvs/ecos/ecos-opt/net/net/bsd_tcpip/current/src/sys/kern/sockio.c,v
retrieving revision 1.5
diff -u -r1.5 sockio.c
--- net/bsd_tcpip/current/src/sys/kern/sockio.c 17 Jan 2004 14:10:52 -0000     1.5
+++ net/bsd_tcpip/current/src/sys/kern/sockio.c 17 Aug 2004 16:55:25 -0000
@@ -246,8 +246,9 @@
 bsd_bind(cyg_file *fp, const sockaddr *sa, socklen_t len)
 {
     int error;
-
-    error = sobind((struct socket *)fp->f_data, (sockaddr *)sa, 0);
+    sockaddr sa1=*sa;
+    
+    error = sobind((struct socket *)fp->f_data, (sockaddr *)&sa1, 0);
     return error;
 }
 


-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]