summaryrefslogtreecommitdiff
path: root/channels.c
diff options
context:
space:
mode:
authorColin Watson <cjwatson@debian.org>2014-02-15 02:11:28 +0000
committerColin Watson <cjwatson@debian.org>2014-02-15 02:11:39 +0000
commit2fe6a8711420abb2751e1b36e880019e8fb134a1 (patch)
treeef6297a2a353f609318f0d4131e9b22119b73f4e /channels.c
parent99a7116957f4fe28a42db97edb20c424b4aa593d (diff)
parent18e1479bf4586a14b88dab082af10a8981b9d48d (diff)
Fix getsockname errors when using "ssh -W" (closes: #738693).
Diffstat (limited to 'channels.c')
-rw-r--r--channels.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/channels.c b/channels.c
index e741f29b9..8e66265a3 100644
--- a/channels.c
+++ b/channels.c
@@ -1386,7 +1386,7 @@ port_open_helper(Channel *c, char *rtype)
1386 int direct; 1386 int direct;
1387 char buf[1024]; 1387 char buf[1024];
1388 char *local_ipaddr = get_local_ipaddr(c->sock); 1388 char *local_ipaddr = get_local_ipaddr(c->sock);
1389 int local_port = get_sock_port(c->sock, 1); 1389 int local_port = c->sock == -1 ? 65536 : get_sock_port(c->sock, 1);
1390 char *remote_ipaddr = get_peer_ipaddr(c->sock); 1390 char *remote_ipaddr = get_peer_ipaddr(c->sock);
1391 int remote_port = get_peer_port(c->sock); 1391 int remote_port = get_peer_port(c->sock);
1392 1392