[jboss-as7-dev] ipv6 "usability" question
Max Rydahl Andersen
max.andersen at redhat.com
Fri May 25 15:19:29 EDT 2012
>> The JDK IP address parser will accept [], I believe, but it's not a
>> valid address.
>
> Yes; the reason -b [::1] works is because InetAddress.getByName("[::1]")
> works. It's not a case of the AS exerting effort to allow it to work;
> we'd have to add code to make it not work.
gotcha.
>> I'd say that we should allow [] but not recommend it.
>
> Agreed. If the AS stops supporting it we will break people who for
> whatever reason have needlessly added the []. If we do that we need to
> have a good explanation (almost a FAQ) as to why we made that choice.
yup.
>> For tools, it's a question of parsing the IP address (getAddressByName
>> should do it), determining if it's a nameless IPv6 address, and if so,
>> escaping it; not too onerous a burden in my opinion.
not sure where that getAddressByName is ? you mean getByName(str) from http://docs.oracle.com/javase/6/docs/api/java/net/InetAddress.html ?
But that is going to do a dns lookup - and those are damn slow if they don't exist on some OS's.
Now that I've realized ipv6 is pure evil from a usability side the the way I'm thinking is that we will
assume the address is "raw" and if we need to create a url we will do this:
public static String formatPossibleIpv6Address(String address) {
if (address == null) {
return address;
}
if (!address.contains(":")) {
return address;
}
if (address.startsWith("[") && address.endsWith("]")) {
return address;
}
return "[" + address + "]";
}
and if we need the raw address we wont do the above and then it depends on the lower layers
to treat it nicely ;)
lower layers here means parts of eclipse we can't change to do these kind of escaping or unescaping which
might be necessary in some places too.
/max
>>
>> On 05/25/2012 06:47 AM, Max Rydahl Andersen wrote:
>>> so in your future using [:::1] should error if not used in a url ?
>>>
>>> That is what ssh command line seem to be doing btw
>>>
>>> /max
>>>
>>> On May 25, 2012, at 13:43 , Pavel Janousek wrote:
>>>
>>>> Hi Max,
>>>>
>>>> I really hate to use [xyz] anywhere I'd like to use literal IPv6 address. IP address should be always without brackets! On the other hand, URL need brackets because URL port (+ password) delimiter is the same as IPv6 IP's group delimiter - in this case [] are needed in _every_ case, but again - only when we are using _literal_ IPv6 address, not name. In an URL brackets are important to use because ambiguity can be occurred very easily.
>>>>
>>>> I hate the present (only one) possible option as ./standalone.sh ... -b [IPv6] -bmanagement=IPv6 because it is really bad and at least unprofessional... in every case we'd like to specify literal IP address, we should do this _only_ without bracket, because this is only one possible text representation...
>>>>
>>>> I guess, my thought isn't accepted by majority up to now (as we can see in present AS7), but I'd like to bet future is mine...:)
>>>>
>>>> Pavel
>>>>
>>>> ----- Original Message -----
>>>>> From: "Max Rydahl Andersen"<max.andersen at redhat.com>
>>>>> To: "jboss-as7-dev at lists.jboss.org Development"<jboss-as7-dev at lists.jboss.org>
>>>>> Sent: Friday, May 25, 2012 12:30:44 PM
>>>>> Subject: [jboss-as7-dev] ipv6 "usability" question
>>>>>
>>>>> Hi guys,
>>>>>
>>>>> Trying to be sure our tools actually can connect/work with ipv6
>>>>> enabled servers we're are hitting a bit of a snag.
>>>>>
>>>>> Is it expected that clients unescapes/escapes ipv6 addresses or is
>>>>> :::1 and [:::1] considered equivalent ?
>>>>>
>>>>> i.e. do code need to add []'s when constructing urls, and remove []'s
>>>>> when passing it to things that just need an address ?
>>>>>
>>>>> Just wondering if we could tells users to put [::1] into hostname
>>>>> fields if they want to use ipv6 - then we don't need to add all this
>>>>> escaping/unescaping
>>>>> for ipv6 in the UI layer of tools.
>>>>>
>>>>> /max
>>>>>
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> jboss-as7-dev mailing list
>>>>> jboss-as7-dev at lists.jboss.org
>>>>> https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
>>>>>
>>>
>>>
>>> _______________________________________________
>>> jboss-as7-dev mailing list
>>> jboss-as7-dev at lists.jboss.org
>>> https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
>>
>>
>
>
> --
> Brian Stansberry
> Principal Software Engineer
> JBoss by Red Hat
> _______________________________________________
> jboss-as7-dev mailing list
> jboss-as7-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
More information about the jboss-as7-dev
mailing list