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:30:35 UTC
[jira] [Created] (FELIX-4345) Add support for IPv4 and IPv6
addresses for console
Alex Blewitt created FELIX-4345:
-----------------------------------
Summary: 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)