View | Details | Raw Unified | Return to bug 1054
Collapse All | Expand All

(-)canohost.c (-2 / +2 lines)
Lines 12-18 Link Here
12
 */
12
 */
13
13
14
#include "includes.h"
14
#include "includes.h"
15
RCSID("$OpenBSD: canohost.c,v 1.42 2005/02/18 03:05:53 djm Exp $");
15
RCSID("$OpenBSD: canohost.c,v 1.43 2005/06/16 08:00:00 markus Exp $");
16
16
17
#include "packet.h"
17
#include "packet.h"
18
#include "xmalloc.h"
18
#include "xmalloc.h"
Lines 307-313 get_sock_port(int sock, int local) Link Here
307
	} else {
307
	} else {
308
		if (getpeername(sock, (struct sockaddr *)&from, &fromlen) < 0) {
308
		if (getpeername(sock, (struct sockaddr *)&from, &fromlen) < 0) {
309
			debug("getpeername failed: %.100s", strerror(errno));
309
			debug("getpeername failed: %.100s", strerror(errno));
310
			cleanup_exit(255);
310
			return -1;
311
		}
311
		}
312
	}
312
	}
313
	/* Return port number. */
313
	/* Return port number. */
(-)channels.c (-3 / +3 lines)
Lines 39-45 Link Here
39
 */
39
 */
40
40
41
#include "includes.h"
41
#include "includes.h"
42
RCSID("$OpenBSD: channels.c,v 1.215 2005/06/16 03:38:36 djm Exp $");
42
RCSID("$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"
Lines 1177-1183 port_open_helper(Channel *c, char *rtype Link Here
1177
	int direct;
1177
	int direct;
1178
	char buf[1024];
1178
	char buf[1024];
1179
	char *remote_ipaddr = get_peer_ipaddr(c->sock);
1179
	char *remote_ipaddr = get_peer_ipaddr(c->sock);
1180
	u_short remote_port = get_peer_port(c->sock);
1180
	int remote_port = get_peer_port(c->sock);
1181
1181
1182
	direct = (strcmp(rtype, "direct-tcpip") == 0);
1182
	direct = (strcmp(rtype, "direct-tcpip") == 0);
1183
1183
Lines 1207-1213 port_open_helper(Channel *c, char *rtype Link Here
1207
		}
1207
		}
1208
		/* originator host and port */
1208
		/* originator host and port */
1209
		packet_put_cstring(remote_ipaddr);
1209
		packet_put_cstring(remote_ipaddr);
1210
		packet_put_int(remote_port);
1210
		packet_put_int((u_int)remote_port);
1211
		packet_send();
1211
		packet_send();
1212
	} else {
1212
	} else {
1213
		packet_start(SSH_MSG_PORT_OPEN);
1213
		packet_start(SSH_MSG_PORT_OPEN);
(-)sshd.c (-2 / +5 lines)
Lines 42-48 Link Here
42
 */
42
 */
43
43
44
#include "includes.h"
44
#include "includes.h"
45
RCSID("$OpenBSD: sshd.c,v 1.309 2005/04/06 09:43:59 djm Exp $");
45
RCSID("$OpenBSD: sshd.c,v 1.310 2005/06/16 08:00:00 markus Exp $");
46
46
47
#include <openssl/dh.h>
47
#include <openssl/dh.h>
48
#include <openssl/bn.h>
48
#include <openssl/bn.h>
Lines 1556-1562 main(int ac, char **av) Link Here
1556
	    setsockopt(sock_in, SOL_SOCKET, SO_KEEPALIVE, &on, sizeof(on)) < 0)
1556
	    setsockopt(sock_in, SOL_SOCKET, SO_KEEPALIVE, &on, sizeof(on)) < 0)
1557
		error("setsockopt SO_KEEPALIVE: %.100s", strerror(errno));
1557
		error("setsockopt SO_KEEPALIVE: %.100s", strerror(errno));
1558
1558
1559
	remote_port = get_remote_port();
1559
	if ((remote_port = get_remote_port()) < 0) {
1560
		debug("get_remote_port failed");
1561
		cleanup_exit(255);
1562
	}
1560
	remote_ip = get_remote_ipaddr();
1563
	remote_ip = get_remote_ipaddr();
1561
1564
1562
#ifdef LIBWRAP
1565
#ifdef LIBWRAP

Return to bug 1054