From owner-freebsd-bugs Wed Jan 9 9: 8:38 2002 Delivered-To: freebsd-bugs@freebsd.org Received: from shuttle.wide.toshiba.co.jp (shuttle.wide.toshiba.co.jp [202.249.10.124]) by hub.freebsd.org (Postfix) with ESMTP id 9AEAB37B416; Wed, 9 Jan 2002 09:08:32 -0800 (PST) Received: from localhost ([3ffe:501:100f:13ff::a]) by shuttle.wide.toshiba.co.jp (8.11.6/8.9.1) with ESMTP id g09H8M363565; Thu, 10 Jan 2002 02:08:22 +0900 (JST) Date: Thu, 10 Jan 2002 02:10:18 +0900 Message-ID: From: JINMEI Tatuya / =?ISO-2022-JP?B?GyRCP0BMQEMjOkgbKEI=?= To: "June Carey" Cc: net@FreeBSD.ORG, bugs@FreeBSD.ORG Subject: Re: FreeBSD-4.3 IPv6 bug - Further information. In-Reply-To: References: User-Agent: Wanderlust/2.7.5 (Too Funky) Emacs/21.1 Mule/5.0 (SAKAKI) Organization: Research & Development Center, Toshiba Corp., Kawasaki, Japan. MIME-Version: 1.0 (generated by SEMI 1.14.3 - "Ushinoya") Content-Type: text/plain; charset=US-ASCII X-Dispatcher: imput version 980905(IM100) Lines: 36 Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >>>>> On Tue, 08 Jan 2002 17:57:00 +0000, >>>>> "June Carey" said: > END OF CLIENT/SERVER CONNECTION RESULTS > ======================================= > The "bug" is that netstat(1) shows a tcp4 connection between the Server and > the Client, but accept(2) is filling out the address structure with a > sin_family of 28, when it should be 2 (AF_INET). > The other "bug" I've recently discovered, and which is demonstrated above, > is that when you've got a tcp4 connection between the Client and the Server, > "addrLen" is 28, when it should be 16. Well, unfortunately, this behavior is not a bug. An AF_INET6 socket can accept an IPv4 connection with IPv4-mapped IPv6 addresses, as specified in draft-ietf-ipngwg-rfc2553bis-04.txt. In this case, of course, the sa_family field is AF_INET6, and the sa_len field is sizeof(sockaddr_in6). FreeBSD 4.4-RELEASE has a partial support to disable this feature by the IPV6_V6ONLY option, which, as far as I know, is not included in FreeBSD 4.3. If you do not want to accept an IPv4 connection on an AF_INET6 socket, I'd recommend you to migrate to FreeBSD 4.4 and rewrite the application with the option. By the way, detail behaviors about IPv4-mapped IPv6 addresses are very different among various OSes, so you should be careful if you want to make your applications portable on other OSes. You may also want to check at the following web page to see the differences: http://www.kame.net/newsletter/20010504/ JINMEI, Tatuya Communication Platform Lab. Corporate R&D Center, Toshiba Corp. jinmei@isl.rdc.toshiba.co.jp To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message