From 677257fe07dd2b9a58817e1d42fc2c25bb618a4d Mon Sep 17 00:00:00 2001 From: Damien Miller Date: Fri, 17 Jun 2005 12:55:03 +1000 Subject: - markus@cvs.openbsd.org 2005/06/16 08:00:00 [canohost.c channels.c sshd.c] don't exit if getpeername fails for forwarded ports; bugzilla #1054; ok djm --- channels.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'channels.c') diff --git a/channels.c b/channels.c index 440043b9..66b15f5b 100644 --- a/channels.c +++ b/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" @@ -1178,7 +1178,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); @@ -1208,7 +1208,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); -- cgit v1.2.3