GitHub user sanhex opened a pull request:
https://github.com/apache/incubator-guacamole-server/pull/113
GUACAMOLE-396: Fixing ssh socket for IPv6 address
GUACAMOLE-396: guacd cannot connect to ssh servers with IPv6 addresses
Root Cause:
In the ssh library of guacd, the TCP socket for connecting to ssh server is
created with AF_INET. So it does not support IPv6 address.
Solution:
When guacd creates the socket for ssh in guac_common_ssh_create_session(),
stop using hard coded AF_INET for socket() call, use the address family which
is returned from getaddrinfo().
Test:
- Connected successfully via ssh connections with IPv4 and IPv6 hosts.
- No connection error in guacd logs.
- Simulated a connection failure with specifying a ssh server which does
not exist. guacd worked well in this case.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/sanhex/incubator-guacamole-server patch-1
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/incubator-guacamole-server/pull/113.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #113
----
commit f33467801bdff22bfd3dac00e09092c115f71604
Author: James <[email protected]>
Date: 2017-09-25T23:57:33Z
Fixing ssh socket for IPv6 address
GUACAMOLE-396: guacd cannot connect to ssh servers with IPv6 addresses
Root Cause:
In the ssh library of guacd, the TCP socket for connecting to ssh server is
created with AF_INET. So it does not support IPv6 address.
Solution:
When guacd creates the socket for ssh in guac_common_ssh_create_session(),
stop using hard coded AF_INET for socket() call, use the address family which
is returned from getaddrinfo().
Test:
- Connected successfully via ssh connections with IPv4 and IPv6 hosts.
- No connection error in guacd logs.
- Simulated a connection failure with specifying a ssh server which does
not exist. guacd worked well in this case.
----
---