From owner-freebsd-java Wed Feb 11 17:29:35 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id RAA02136 for java-outgoing; Wed, 11 Feb 1998 17:29:35 -0800 (PST) (envelope-from owner-freebsd-java@FreeBSD.ORG) Received: from hq.freegate.com (ns.freegate.com [208.226.86.1]) by hub.freebsd.org (8.8.8/8.8.8) with SMTP id RAA02121 for ; Wed, 11 Feb 1998 17:29:28 -0800 (PST) (envelope-from sbb@freegate.com) Received: (qmail+freegate 3838 invoked by alias); 12 Feb 1998 01:29:26 -0000 Received: from ws165.hq.freegate.com (HELO sbb.hq.stevelab.com) (208.226.86.165) by ns.hq.freegate.com with SMTP; 12 Feb 1998 01:29:26 -0000 Received: by sbb.hq.stevelab.com with Microsoft Mail id <01BD3712.ED774E80@sbb.hq.stevelab.com>; Wed, 11 Feb 1998 17:31:46 -0800 Message-ID: <01BD3712.ED774E80@sbb.hq.stevelab.com> From: Steve Byrne To: "freebsd-java@hub.freebsd.org" , "java-port@hub.freebsd.org" , "'Jeffrey Hsu'" Subject: RE: IP address byte order bug Date: Wed, 11 Feb 1998 17:31:43 -0800 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: owner-freebsd-java@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Yes, but they *do* have the problem on Solaris x86, so it still is a bug. Note how there is lots of other code in this file that properly does ntohl etc. This was just a careless omission. I had to fix this in my Linux port too. Yuk. ---------- From: Jeffrey Hsu Sent: Wednesday, February 11, 1998 5:14 PM To: freebsd-java@hub.freebsd.org; java-port@hub.freebsd.org Subject: IP address byte order bug Here's something I just fixed in my tree which you won't see in Sun's tree because they don't have this problem on their big-endian SPARC processor. In src/solaris/net/socket.c: *************** *** 620,626 **** NET_ERROR(0, JAVANETPKG "SocketException", strerror(errno)); return -1; } ! return (him.sin_addr.s_addr == INADDR_ANY) ? -1: him.sin_addr.s_addr; } else if (opt == JSO_LINGER) { struct linger arg; int len = sizeof(struct linger); --- 704,710 ---- NET_ERROR(0, JAVANETPKG "SocketException", strerror(errno)); return -1; } ! return (him.sin_addr.s_addr == INADDR_ANY) ? -1: ntohl(him.sin_addr.s_addr); } else if (opt == JSO_LINGER) { struct linger arg; int len = sizeof(struct linger); To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe java" in the body of the message To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe java" in the body of the message