summaryrefslogtreecommitdiff
path: root/channels.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2005-06-17 12:55:03 +1000
committerDamien Miller <djm@mindrot.org>2005-06-17 12:55:03 +1000
commit677257fe07dd2b9a58817e1d42fc2c25bb618a4d (patch)
tree087406abe9a0f12491122452ecad2b44a04d7908 /channels.c
parent17e7ed0e754577ae61cdd5e3f03b33fba2a09337 (diff)
- 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
Diffstat (limited to 'channels.c')
-rw-r--r--channels.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/channels.c b/channels.c
index 440043b9c..66b15f5b5 100644
--- a/channels.c
+++ b/channels.c
@@ -39,7 +39,7 @@
39 */ 39 */
40 40
41#include "includes.h" 41#include "includes.h"
42RCSID("$OpenBSD: channels.c,v 1.215 2005/06/16 03:38:36 djm Exp $"); 42RCSID("$OpenBSD: channels.c,v 1.216 2005/06/16 08:00:00 markus Exp $");
43 43
44#include "ssh.h" 44#include "ssh.h"
45#include "ssh1.h" 45#include "ssh1.h"
@@ -1178,7 +1178,7 @@ port_open_helper(Channel *c, char *rtype)
1178 int direct; 1178 int direct;
1179 char buf[1024]; 1179 char buf[1024];
1180 char *remote_ipaddr = get_peer_ipaddr(c->sock); 1180 char *remote_ipaddr = get_peer_ipaddr(c->sock);
1181 u_short remote_port = get_peer_port(c->sock); 1181 int remote_port = get_peer_port(c->sock);
1182 1182
1183 direct = (strcmp(rtype, "direct-tcpip") == 0); 1183 direct = (strcmp(rtype, "direct-tcpip") == 0);
1184 1184
@@ -1208,7 +1208,7 @@ port_open_helper(Channel *c, char *rtype)
1208 } 1208 }
1209 /* originator host and port */ 1209 /* originator host and port */
1210 packet_put_cstring(remote_ipaddr); 1210 packet_put_cstring(remote_ipaddr);
1211 packet_put_int(remote_port); 1211 packet_put_int((u_int)remote_port);
1212 packet_send(); 1212 packet_send();
1213 } else { 1213 } else {
1214 packet_start(SSH_MSG_PORT_OPEN); 1214 packet_start(SSH_MSG_PORT_OPEN);