From owner-freebsd-net@FreeBSD.ORG Mon Jun 27 11:46:34 2011 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0C50D1065672; Mon, 27 Jun 2011 11:46:34 +0000 (UTC) (envelope-from prvs=11594ac97a=killing@multiplay.co.uk) Received: from mail1.multiplay.co.uk (mail1.multiplay.co.uk [85.236.96.23]) by mx1.freebsd.org (Postfix) with ESMTP id 289708FC18; Mon, 27 Jun 2011 11:46:32 +0000 (UTC) X-MDAV-Processed: mail1.multiplay.co.uk, Mon, 27 Jun 2011 12:34:40 +0100 X-Spam-Processed: mail1.multiplay.co.uk, Mon, 27 Jun 2011 12:34:40 +0100 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on mail1.multiplay.co.uk X-Spam-Level: X-Spam-Status: No, score=-5.0 required=6.0 tests=USER_IN_WHITELIST shortcircuit=ham autolearn=disabled version=3.2.5 Received: from r2d2 ([188.220.16.49]) by mail1.multiplay.co.uk (mail1.multiplay.co.uk [85.236.96.23]) (MDaemon PRO v10.0.4) with ESMTP id md50013885737.msg; Mon, 27 Jun 2011 12:34:38 +0100 X-MDRemoteIP: 188.220.16.49 X-Return-Path: prvs=11594ac97a=killing@multiplay.co.uk X-Envelope-From: killing@multiplay.co.uk Message-ID: <01DA6DDBE3684C3785734F16008244E4@multiplay.co.uk> From: "Steven Hartland" To: "Matthias Andree" References: <9585F512F239475B8145C3D344F6EC62@multiplay.co.uk> <4E051576.7090505@gmx.de> <512CB9DD5802403BA3ACC48FE3AE63F5@multiplay.co.uk> <4E0866AD.6010203@gmx.de> Date: Mon, 27 Jun 2011 12:34:57 +0100 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.5931 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6090 Cc: freebsd-net@freebsd.org, freebsd-java@freebsd.org, freebsd-hackers@freebsd.org Subject: Re: IPv4 socket bind using IPv6 socket on openjdk6 breaks udp send X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Jun 2011 11:46:34 -0000 ----- Original Message ----- From: "Matthias Andree" >> No I'm not its replying to the sender. > > Yes you are, check your trace: The sendto address and port are the same > as the bound address. This is a bug in truss it seems, Bjoern said he's gonna have a look at it. Doesn't matter what you bind to it always reports this value in the truss output. >> In the java code we have:- >> socket.send( new DatagramPacket( data, data.length, >> src.getSocketAddress() ) ); >> Where src is the src packet. This works fine on IPv4 only machines and >> when the jdk is told to use only IPv4 stack. So its not a problem with >> the java code itself but could well be an issue with the > > What data type is it? All mute as the Bjoern found and fixed the issue, it was a bug in the kernel fixed by:- http://svnweb.freebsd.org/base?view=revision&revision=220463 >> Oops sorry cut and paste error (wrong line) heres the correct line. >> root java 894 20 udp4 85.236.109.212:25675 *:* > > While a datagram socket, it does not match the socket()/bind() above. > > An INET6-domain datagram socket would be listed as udp6 here. Are you > sure you're tracing the right VM and are looking at the right thread? Again, truss isn't showing the correct results, confused me too ;-) Possibly another bug in sockstat / netstat as well, when the socket is a IPv6 socket bound to an IPv4 address maybe it should indicate this e.g. udp6-4 instead of either udp4 or udp6; alternatively maybe udp6 + a IPv4 address is enough to indicate this, but that could cause confusion. Thanks for looking at this, appreciated :) Regards Steve ================================================ This e.mail is private and confidential between Multiplay (UK) Ltd. and the person or entity to whom it is addressed. In the event of misdirection, the recipient is prohibited from using, copying, printing or otherwise disseminating it or any information contained in it. In the event of misdirection, illegible or incomplete transmission please telephone +44 845 868 1337 or return the E.mail to postmaster@multiplay.co.uk.