You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Alex Blewitt (JIRA)" <ji...@apache.org> on 2013/12/06 00:38:35 UTC

[jira] [Commented] (FELIX-4345) Add support for IPv4 and IPv6 addresses for console

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

Alex Blewitt commented on FELIX-4345:
-------------------------------------

>From here:

http://svn.apache.org/viewvc/felix/trunk/gogo/shell/src/main/java/org/apache/felix/gogo/shell/Telnet.java?view=markup&pathrev=1057521

> Add support for IPv4 and IPv6 addresses for console
> ---------------------------------------------------
>
>                 Key: FELIX-4345
>                 URL: https://issues.apache.org/jira/browse/FELIX-4345
>             Project: Felix
>          Issue Type: Improvement
>          Components: Gogo Shell
>    Affects Versions: gogo.shell-0.10.0
>            Reporter: Alex Blewitt
>            Priority: Trivial
>
> The telnetd server only listens to IPv4 or IPv6 because the default value for the --ip parameter is "".
> Even though 'localhost' resolves to both ::1 and 127.0.0.1, passing in "" for the address results in it picking one of them.
> If the value is 'null' for the IP address then it will resolve and bind to both network addresses.
> The bug is here:
> 118	        server = new ServerSocket(port, 0, InetAddress.getByName(ip));
> This should be:
>                 InetAddress address = "".equals(ip) ?  null : InetAddress.getByName(p);
> 118	        server = new ServerSocket(port, 0, address);



--
This message was sent by Atlassian JIRA
(v6.1#6144)