Jaikit Savla
2017-07-01 18:56:45 UTC
Hello Everyone,
As per RFC 4291 (https://tools.ietf.org/html/rfc4291#section-2.2) , IPV6 address can be represented in 3 ways:a. 2001:DB8:0:0:8:800:200C:417Ab. ::1Â c. ::13.1.68.3 Â
"isIPv6Address" within InetAddressUtils checks only for a, b (above) and does not consider IPv4MappedIPv64Address (case c) as valid. Â
Based on the RFC, option c above is considered valid. Does anyone know why it is not considered as part of api "isIPv6Address" api above ? and alternatively should it be considered as valid ?
reference:Â https://github.com/apache/httpcomponents-core/blob/master/httpcore5/src/main/java/org/apache/hc/core5/net/InetAddressUtils.javahttps://tools.ietf.org/html/rfc5156#section-2.2Â Â --Â ::FFFF:0:0/96 are the IPv4-mapped addresses [RFC4291]. Addresses
within this block should not appear on the public Internet.
commit where isIPv4MappedIPv64Address was added but does not look like it is being used.  Does anyone know any particular usage of IPv4MappedIPv6 ?https://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/net/InetAddressUtils.java?r1=1406216&r2=1444926&pathrev=1767956&diff_format=hÂ
Thanks,Jaikit
As per RFC 4291 (https://tools.ietf.org/html/rfc4291#section-2.2) , IPV6 address can be represented in 3 ways:a. 2001:DB8:0:0:8:800:200C:417Ab. ::1Â c. ::13.1.68.3 Â
"isIPv6Address" within InetAddressUtils checks only for a, b (above) and does not consider IPv4MappedIPv64Address (case c) as valid. Â
Based on the RFC, option c above is considered valid. Does anyone know why it is not considered as part of api "isIPv6Address" api above ? and alternatively should it be considered as valid ?
reference:Â https://github.com/apache/httpcomponents-core/blob/master/httpcore5/src/main/java/org/apache/hc/core5/net/InetAddressUtils.javahttps://tools.ietf.org/html/rfc5156#section-2.2Â Â --Â ::FFFF:0:0/96 are the IPv4-mapped addresses [RFC4291]. Addresses
within this block should not appear on the public Internet.
commit where isIPv4MappedIPv64Address was added but does not look like it is being used.  Does anyone know any particular usage of IPv4MappedIPv6 ?https://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore5/src/main/java/org/apache/hc/core5/net/InetAddressUtils.java?r1=1406216&r2=1444926&pathrev=1767956&diff_format=hÂ
Thanks,Jaikit