summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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