summaryrefslogtreecommitdiff
path: root/usr.bin/ssh/channels.c
diff options
context:
space:
mode:
authorMarkus Friedl <markus@cvs.openbsd.org>2005-06-16 08:00:01 +0000
committerMarkus Friedl <markus@cvs.openbsd.org>2005-06-16 08:00:01 +0000
commit8432919c2ea4aea3fa64e5c5177ba4c5742df562 (patch)
tree1b3f0f653388b104a95d0817116cd19a5439698e /usr.bin/ssh/channels.c
parent2e3d8feb783cb3e45c3a81ea6935fe9e5b17943a (diff)
don't exit if getpeername fails for forwarded ports; bugzilla #1054; ok djm
Diffstat (limited to 'usr.bin/ssh/channels.c')
-rw-r--r--usr.bin/ssh/channels.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/ssh/channels.c b/usr.bin/ssh/channels.c
index dcc161d1147..6ff0043e41e 100644
--- a/usr.bin/ssh/channels.c
+++ b/usr.bin/ssh/channels.c
@@ -39,7 +39,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: channels.c,v 1.215 2005/06/16 03:38:36 djm Exp $");
+RCSID("$OpenBSD: channels.c,v 1.216 2005/06/16 08:00:00 markus Exp $");
#include "ssh.h"
#include "ssh1.h"
@@ -1177,7 +1177,7 @@ port_open_helper(Channel *c, char *rtype)
int direct;
char buf[1024];
char *remote_ipaddr = get_peer_ipaddr(c->sock);
- u_short remote_port = get_peer_port(c->sock);
+ int remote_port = get_peer_port(c->sock);
direct = (strcmp(rtype, "direct-tcpip") == 0);
@@ -1207,7 +1207,7 @@ port_open_helper(Channel *c, char *rtype)
}
/* originator host and port */
packet_put_cstring(remote_ipaddr);
- packet_put_int(remote_port);
+ packet_put_int((u_int)remote_port);
packet_send();
} else {
packet_start(SSH_MSG_PORT_OPEN);