<< Back to previous view

[GLASSFISH-19428] com.sun.appserv.iiop.endpoints does not support IPV6 Created: 11/Dec/12  Updated: 09/Apr/13  Resolved: 09/Apr/13

Status: Resolved
Project: glassfish
Component/s: orb
Affects Version/s: 4.0
Fix Version/s: 4.0_b84_RC1

Type: Bug Priority: Major
Reporter: lzg5039 Assignee: Harshad Vilekar
Resolution: Fixed Votes: 0
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

windows


File Attachments: Text File RoundRobinPolicy.patch    
Tags: 4_0-approved
Participants: Harshad Vilekar, lzg5039, shreedhar_ganapathy and Tom Mueller

 Description   

because the IPV6 address contains ":",so when the value of "com.sun.appserv.iiop.endpoints" contains IPV6 address,the following code which is marked ★ can not get the correct ip and port

Directory: orb\orb-iiop\src\main\java\
Package: org.glassfish.enterprise.iiop.impl
Class:RoundRobinPolicy

private ClusterInstanceInfo makeClusterInstanceInfo(String str, 
    int weight) {

    String[] host_port = str.split(":");  ★
    String server_identifier = ""; //for bootstrapping, can be ""
    String type = CLEAR_TEXT; //will be clear_text for bootstrapping
    SocketInfo socketInfo = new SocketInfo(
        type, host_port[0], Integer.parseInt( host_port[1]) );
    List<SocketInfo> sil = new ArrayList<SocketInfo>(1) ;
    sil.add( socketInfo ) ;

    return new ClusterInstanceInfo(server_identifier, weight, sil);
}


 Comments   
Comment by shreedhar_ganapathy [ 13/Dec/12 06:35 PM ]

Reassigning to Orb component

Comment by Harshad Vilekar [ 20/Feb/13 02:14 AM ]

Colon ( characters in IPv6 address conflicts with the established syntax - where the colon is used to terminate the host path before a port number. This works with literal ipv4 address. Update host:port string parsing to support literal IPv6 address.

Comment by lzg5039 [ 22/Feb/13 10:01 AM ]

Harshad Vilekar:
Thanks for you to help me to fix this bug. Can I create a fix for the bug, and someone help me to review it in the future?

Comment by Harshad Vilekar [ 25/Feb/13 05:39 AM ]

linzhengguo: Yes, please test your fix with:

1. literal ipv6 format address,
2. literal ipv4 address, and
3. regular hostname.

Then attach the file diff for review.

Comment by lzg5039 [ 26/Feb/13 09:02 AM ]

Harshad Vilekar:
I hava done the following tests, and set address by "com.sun.appserv.iiop.endpoints"
>1. literal ipv6 format address,
Test OK
>2. literal ipv4 address, and
Test OK
>3. regular hostname.
Test OK
>4. ipv6 mix with ipv4
Test OK

Comment by lzg5039 [ 26/Feb/13 09:04 AM ]

Harshad Vilekar:
My fix as follows,you also can the attach file

 
Directory: orb\orb-iiop\src\main\java\
Package: org.glassfish.enterprise.iiop.impl
Class:RoundRobinPolicy

private ClusterInstanceInfo makeClusterInstanceInfo(String str, 
    int weight) {
-   String[] host_port = str.split(":");//delete this code

    //support IPV6 begin add the following code
+   String[] host_port = new String[2];
+   int i = str.lastIndexOf(':');
+   host_port[0] = str.substring(0,i);
+   host_port[1] = str.substring(i+1);
    //support IPV6 end

    String server_identifier = ""; //for bootstrapping, can be ""
    String type = CLEAR_TEXT; //will be clear_text for bootstrapping
    SocketInfo socketInfo = new SocketInfo(
        type, host_port[0], Integer.parseInt( host_port[1]) );
    List<SocketInfo> sil = new ArrayList<SocketInfo>(1) ;
    sil.add( socketInfo ) ;

    return new ClusterInstanceInfo(server_identifier, weight, sil);
}
Comment by Harshad Vilekar [ 05/Apr/13 07:03 AM ]
  • What is the impact on the customer of the bug? Support literal ipv6 address in IIOP endpoint list.
  • How likely is it that a customer will see the bug and how serious is the bug? Only when using ipv6 addresses, rather than host names.
  • Is it a regression? Does it meet other bug fix criteria (security, performance, etc.)? Not a regression.
  • What CTS failures are caused by this bug? No CTS failures.
  • What is the cost/risk of fixing the bug? Fix is ready, under regression test.
  • How risky is the fix? How much work is the fix? Is the fix complicated? Fix is isolated. Not very complex.
  • Is there an impact on documentation or message strings? No.
  • Which tests should QA (re)run to verify the fix did not destabilize GlassFish? Cluster Tests with Remote EJB Apps.
  • Which is the targeted build of 4.0 for this fix? b84
  • Is this an integration of a new version of a component from another project ? No
Comment by Tom Mueller [ 05/Apr/13 02:07 PM ]

Approved for 4.0. Please update the fix version field to the correct build.

Comment by Harshad Vilekar [ 09/Apr/13 12:29 AM ]

Reviewed and Committed the fix suggested by lzg5039. svn revision #61237.

Generated at Sun Apr 20 12:15:05 UTC 2014 using JIRA 4.0.2#472.