Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 12 Mar 2012 01:46:06 GMT
From:      Merlin <merlin@merlinsbox.net>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   java/165957: Enabling IPv6 in port java/jdk16  disables IPv4
Message-ID:  <201203120146.q2C1k6ei039120@red.freebsd.org>
Resent-Message-ID: <201203120150.q2C1oAVr022052@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>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:        
>Keywords:       
>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.
>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).

Namely, the following test program and methodology was used to diagnose the problem:

Started netcat listeners like so:
$ nc -lk 127.0.0.1 2000
$ nc -lk ::1 2000

//
// test.java
// built with javac test.java
// ran with java test
//

import java.net.*;

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();
	}
    }
}

//
// 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).

>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201203120146.q2C1k6ei039120>