From owner-freebsd-java@FreeBSD.ORG Mon Mar 12 15:03:36 2012 Return-Path: Delivered-To: freebsd-java@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 09EC1106564A; Mon, 12 Mar 2012 15:03:36 +0000 (UTC) (envelope-from rb@gid.co.uk) Received: from mx0.gid.co.uk (mx0.gid.co.uk [194.32.164.250]) by mx1.freebsd.org (Postfix) with ESMTP id 80D6E8FC0C; Mon, 12 Mar 2012 15:03:35 +0000 (UTC) Received: from atlas.gid.co.uk (80-46-130-69.static.dsl.as9105.com [80.46.130.69]) by mx0.gid.co.uk (8.14.2/8.14.2) with ESMTP id q2CExXVd055264; Mon, 12 Mar 2012 14:59:33 GMT (envelope-from rb@gid.co.uk) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Bob Bishop In-Reply-To: <201203120146.q2C1k6ei039120@red.freebsd.org> Date: Mon, 12 Mar 2012 14:59:28 +0000 Content-Transfer-Encoding: quoted-printable Message-Id: <9698A471-795D-4FF9-A908-0278D5DC0BF9@gid.co.uk> References: <201203120146.q2C1k6ei039120@red.freebsd.org> To: Merlin X-Mailer: Apple Mail (2.1084) Cc: freebsd-gnats-submit@freebsd.org, freebsd-java@freebsd.org Subject: Re: java/165957: Enabling IPv6 in port java/jdk16 disables IPv4 X-BeenThere: freebsd-java@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting Java to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Mar 2012 15:03:36 -0000 Hi, On 12 Mar 2012, at 01:46, Merlin wrote: >=20 >> Number: 165957 >> Category: java >> Synopsis: Enabling IPv6 in port java/jdk16 disables IPv4 >> Confidential: no >> Severity: serious >> Priority: low >> Responsible: freebsd-java >> State: open >> Quarter: =20 >> Keywords: =20 >> Date-Required: >> Class: sw-bug >> Submitter-Id: current-users >> Arrival-Date: Mon Mar 12 01:50:10 UTC 2012 >> Closed-Date: >> Last-Modified: >> Originator: Merlin >> Release: 9.0-RELEASE >> Organization: > merlinsbox.net >> Environment: > FreeBSD machine.merlinsbox.net 9.0-RELEASE FreeBSD 9.0-RELEASE #0: Tue = Jan 3 07:46:30 UTC 2012 = root@farrell.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC amd64 >> Description: > java/jdk16 with IPV6 enabled in configuration caused ipv4 to be = disabled. Many applications which used the network all failed, unless = dealing with ipv6 addresses. A test case of creating a connected socket = and outputting the exception showed an invalid parameter was being = passed to a socket call, which lead to the discovery that only ipv4 = addresses were affected by this issue. Probably java with IPv6 assumes IPv4 mapped addressing is in use = (net.inet6.ip6.v6only =3D 0), which is likely to break other = applications.=20 >> How-To-Repeat: > Built and installed java/jdk16 from ports inside a jail on a build = machine, with IPV6, WEB, POLICY, TZUPDATE, and JAIL selected in the = configuration. Installed on two machines with the same effect (no = ipv4). >=20 > Namely, the following test program and methodology was used to = diagnose the problem: >=20 > Started netcat listeners like so: > $ nc -lk 127.0.0.1 2000 > $ nc -lk ::1 2000 >=20 > // > // test.java > // built with javac test.java > // ran with java test > // >=20 > import java.net.*; >=20 > public class test { > public static void main(String argv[]) > { > try { > // This line was modified to be 127.0.0.1 to test ipv4 > new Socket("::1", 2000); > System.out.println("Success"); > } catch (Exception e) { > e.printStackTrace(); > } > } > } >=20 > // > // end test.java > // >> Fix: > Rebuilding the port without IPV6 has fixed IPV4, but now I cannot of = course use IPV6. Thankfully, I didn't really NEED it (not like I NEED = IPv4 anyway :P). >=20 >> Release-Note: >> Audit-Trail: >> Unformatted: > _______________________________________________ > freebsd-java@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-java > To unsubscribe, send any mail to = "freebsd-java-unsubscribe@freebsd.org" >=20 -- Bob Bishop +44 (0)118 940 1243 rb@gid.co.uk fax +44 (0)118 940 1295 mobile +44 (0)783 626 4518