[mod_cluster-issues] [JBoss JIRA] Commented: (MODCLUSTER-156) Parsing of IPv6 loopback address fails

Paul Ferraro (JIRA) jira-events at lists.jboss.org
Wed May 12 11:51:27 EDT 2010


    [ https://jira.jboss.org/jira/browse/MODCLUSTER-156?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12530391#action_12530391 ] 

Paul Ferraro commented on MODCLUSTER-156:
-----------------------------------------

The Utils.parseSocketAddress(...) method is used to parse an address[:port] string, where the port is optional.  The current logic unfortunately assumes an ipv4 address.  To accommodate ipv6 addresses, we need to figure out how to distinguish the colon used in the ipv6 address from the colon port delimiter.
e.g.
How to parse ::1:80 ?
Is this 0:0:0:0:0:0:1:80, with no port?  or 0:0:0:0:0:0:0:1, port 80?

As couple possible solutions come to mind:
1. Disallow the use of "::" when specifying ipv6 addresses.  So, we know to look for a port if there are 8 colons.
2. Use ipv6 URL syntax, i.e. [ipv6-address]:port, e.g. [::1]:80

Any advise?

> Parsing of IPv6 loopback address fails
> --------------------------------------
>
>                 Key: MODCLUSTER-156
>                 URL: https://jira.jboss.org/jira/browse/MODCLUSTER-156
>             Project: mod_cluster
>          Issue Type: Bug
>    Affects Versions: 1.1.0.CR1
>            Reporter: Bela Ban
>            Assignee: Jean-Frederic Clere
>             Fix For: 1.1.0.CR3
>
>
> The IPv6 loopback addresss ::1 cannot be parsed. I suspect this also fails for regular IPv6 addresses.
> The stack trace is:
> 04:18:33,829 ERROR [STDERR] Exception in thread "pool-5-thread-1" java.lang.NumberFormatException: For input stri
> ng: ":1:8000"
> 04:18:33,829 ERROR [STDERR] 	at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
> 04:18:33,830 ERROR [STDERR] 	at java.lang.Integer.parseInt(Integer.java:481)
> 04:18:33,830 ERROR [STDERR] 	at java.lang.Integer.parseInt(Integer.java:514)
> 04:18:33,830 ERROR [STDERR] 	at org.jboss.modcluster.Utils.parseSocketAddress(Utils.java:115)
> 04:18:33,830 ERROR [STDERR] 	at org.jboss.modcluster.Utils.parseSocketAddress(Utils.java:76)
> 04:18:33,830 ERROR [STDERR] 	at org.jboss.modcluster.advertise.impl.AdvertiseListenerImpl$AdvertiseListenerWor
> ker.run(AdvertiseListenerImpl.java:505)
> 04:18:33,830 ERROR [STDERR] 	at java.lang.Thread.run(Thread.java:636)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the mod_cluster-issues mailing list