From owner-freebsd-net@FreeBSD.ORG Sat Jun 25 09:27:32 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 37D67106566C for ; Sat, 25 Jun 2011 09:27:32 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mx1.sbone.de (mx1.sbone.de [IPv6:2a01:4f8:130:3ffc::401:25]) by mx1.freebsd.org (Postfix) with ESMTP id BD35D8FC15 for ; Sat, 25 Jun 2011 09:27:31 +0000 (UTC) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:31::2013:587]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id B2E7E25D37C3; Sat, 25 Jun 2011 09:27:30 +0000 (UTC) Received: from content-filter.sbone.de (content-filter.sbone.de [IPv6:fde9:577b:c1a9:31::2013:2742]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id 3AE6415A26B4; Sat, 25 Jun 2011 09:27:29 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:31::2013:587]) by content-filter.sbone.de (content-filter.sbone.de [fde9:577b:c1a9:31::2013:2742]) (amavisd-new, port 10024) with ESMTP id ki6k6yf6XZeF; Sat, 25 Jun 2011 09:27:28 +0000 (UTC) Received: from orange-en1.sbone.de (orange-en1.sbone.de [IPv6:fde9:577b:c1a9:31:cabc:c8ff:fecf:e8e3]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id 1773A15A2693; Sat, 25 Jun 2011 09:27:27 +0000 (UTC) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: "Bjoern A. Zeeb" X-Priority: 3 In-Reply-To: <9585F512F239475B8145C3D344F6EC62@multiplay.co.uk> Date: Sat, 25 Jun 2011 09:27:25 +0000 Content-Transfer-Encoding: quoted-printable Message-Id: <75860ED5-B60D-4EF2-90B6-F313BEFA36F7@FreeBSD.org> References: <9585F512F239475B8145C3D344F6EC62@multiplay.co.uk> To: Steven Hartland X-Mailer: Apple Mail (2.1084) Cc: freebsd-net@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: Sat, 25 Jun 2011 09:27:32 -0000 On Jun 24, 2011, at 9:11 PM, Steven Hartland wrote: Hi, > We're trying to get our machines IPv6 enabled but in doing so this > seems to break java apps using openjdk6 for UDP sends. One of the clues I can give you is: http://diario.behrens.de/2008/10/12/java_and_ipv6_on_bsd.html it's old(er) and I have lately been tolded that openjdk has a problem. > using truss we see the following:- > socket(PF_INET6,SOCK_DGRAM,0) =3D 20 (0x14) > setsockopt(0x14,0x29,0x1b,0x7ffffedf0318,0x4,0x0) =3D 0 (0x0) > setsockopt(0x14,0xffff,0x20,0x7ffffedf031c,0x4,0x0) =3D 0 (0x0) > bind(20,{ AF_INET6 [3800::10:0:0:0]:20736 },28) =3D 0 (0x0) > .. > recvfrom(20,0x7ffffeaeb580,1460,0x0,0x7ffffeaed580,0x7ffffeaed5ac) = ERR#60 'Operation timed out' > .. > sendto(20,"\M^?\M^?\M^?\M^?I\aMultiplay :: "...,82,0x0,{ AF_INET6 = [3800::10:0:0:0]:20736 },0x1c) ERR#22 'Invalid argument' So how much is really between these ...? If you want, can you send me a full output in private email? Also which version of FreeBSD is this? > sockstat shows it binding correctly > root java 894 21 tcp4 85.236.109.212:25675 *:* That's unfortunately unreleated. > The following PR seems relevant but also seems to indicate it was > fixed back in 2006 > http://www.freebsd.org/cgi/query-pr.cgi?pr=3D92620 This doesn't seen to be related to the above as 3800::10:0:0:0 is not a v4-mapped-v6 address. Now there could be the problem really. Do you know which address the code above was trying to talk with? Also do you have a very simple test program I could try to run if I compile openjdk6? /bz --=20 Bjoern A. Zeeb You have to have visions! Stop bit received. Insert coin for new address family.