You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "Nemanja Matkovic (JIRA)" <ji...@apache.org> on 2015/10/01 21:05:27 UTC

[jira] [Commented] (HADOOP-12122) Hadoop should avoid unsafe split and append on fields that might be IPv6 literals

    [ https://issues.apache.org/jira/browse/HADOOP-12122?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14940244#comment-14940244 ] 

Nemanja Matkovic commented on HADOOP-12122:
-------------------------------------------

Hey [~nkedel] Elliott caught small style thing as part of testing HADOOP-12432 on trunk with QAbot - there is "import java.net.*;" and "import java.util.*" in NetUtils.java and * imports is something to avoid.
As you said as part of this patch you will fixup line length are you willing to fix this as well so I don't have to pull in this file to my patch?

> Hadoop should avoid unsafe split and append on fields that might be IPv6 literals
> ---------------------------------------------------------------------------------
>
>                 Key: HADOOP-12122
>                 URL: https://issues.apache.org/jira/browse/HADOOP-12122
>             Project: Hadoop Common
>          Issue Type: Sub-task
>            Reporter: Nate Edel
>            Assignee: Nate Edel
>         Attachments: HADOOP-12122.0.patch, lets_blow_up_a_lot_of_tests.patch
>
>
> There are a fairly extensive number of locations found via code inspection which use unsafe methods of handling addresses in a dual-stack or IPv6-only world:
> - splits on the first ":" assuming that delimits a host from a port
> - produces a host port pair by appending :port blindly (Java prefers [ipv6]:port which is the standard for IPv6 URIs)
> - depends on the behavior of InetSocketAddress.toString() which produces the above.
> This patch fixes those metaphors that I can find above, and replaces calls to InetSocketAddress.toString() with a wrapper that properly brackets the IPv6 address if there is one.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)