Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 12 Mar 2012 14:59:28 +0000
From:      Bob Bishop <rb@gid.co.uk>
To:        Merlin <merlin@merlinsbox.net>
Cc:        freebsd-gnats-submit@freebsd.org, freebsd-java@freebsd.org
Subject:   Re: java/165957: Enabling IPv6 in port java/jdk16  disables IPv4
Message-ID:  <9698A471-795D-4FF9-A908-0278D5DC0BF9@gid.co.uk>
In-Reply-To: <201203120146.q2C1k6ei039120@red.freebsd.org>
References:  <201203120146.q2C1k6ei039120@red.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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








Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?9698A471-795D-4FF9-A908-0278D5DC0BF9>