summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2014-02-24 15:56:07 +1100
committerDamien Miller <djm@mindrot.org>2014-02-24 15:56:07 +1100
commit0890dc8191bb201eb01c3429feec0300a9d3a930 (patch)
tree429f5dbcaa55812e74b5dfc24fcd43edd921d521
parentd3cf67e1117c25d151d0f86396e77ee3a827045a (diff)
- djm@cvs.openbsd.org 2014/02/15 23:05:36
[channels.c] avoid spurious "getsockname failed: Bad file descriptor" errors in ssh -W; bz#2200, debian#738692 via Colin Watson; ok dtucker@
-rw-r--r--ChangeLog4
-rw-r--r--channels.c4
2 files changed, 6 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 057582f40..3da503b43 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -4,6 +4,10 @@
4 [cipher.c mac.c] 4 [cipher.c mac.c]
5 remove some logging that makes ssh debugging output very verbose; 5 remove some logging that makes ssh debugging output very verbose;
6 ok markus 6 ok markus
7 - djm@cvs.openbsd.org 2014/02/15 23:05:36
8 [channels.c]
9 avoid spurious "getsockname failed: Bad file descriptor" errors in ssh -W;
10 bz#2200, debian#738692 via Colin Watson; ok dtucker@
7 11
820140221 1220140221
9 - (tim) [configure.ac] Fix cut-and-paste error. Patch from Bryan Drewery. 13 - (tim) [configure.ac] Fix cut-and-paste error. Patch from Bryan Drewery.
diff --git a/channels.c b/channels.c
index 013accdc4..1052b80ca 100644
--- a/channels.c
+++ b/channels.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: channels.c,v 1.329 2014/01/31 16:39:19 tedu Exp $ */ 1/* $OpenBSD: channels.c,v 1.330 2014/02/15 23:05:36 djm Exp $ */
2/* 2/*
3 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -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