summaryrefslogtreecommitdiff
path: root/channels.c
diff options
context:
space:
mode:
authordjm@openbsd.org <djm@openbsd.org>2016-03-07 19:02:43 +0000
committerDamien Miller <djm@mindrot.org>2016-03-08 06:20:35 +1100
commit95767262caa6692eff1e1565be1f5cb297949a89 (patch)
tree1055360a328d0998dabb966f2e1002389f8c6c41 /channels.c
parentaf0bb38ffd1f2c4f9f43b0029be2efe922815255 (diff)
upstream commit
refactor canohost.c: move functions that cache results closer to the places that use them (authn and session code). After this, no state is cached in canohost.c feedback and ok markus@ Upstream-ID: 5f2e4df88d4803fc8ec59ec53629105e23ce625e
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 c9d2015ee..7ee1f98d0 100644
--- a/channels.c
+++ b/channels.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: channels.c,v 1.349 2016/02/05 13:28:19 naddy Exp $ */ 1/* $OpenBSD: channels.c,v 1.350 2016/03/07 19:02:43 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
@@ -1416,7 +1416,7 @@ port_open_helper(Channel *c, char *rtype)
1416{ 1416{
1417 char buf[1024]; 1417 char buf[1024];
1418 char *local_ipaddr = get_local_ipaddr(c->sock); 1418 char *local_ipaddr = get_local_ipaddr(c->sock);
1419 int local_port = c->sock == -1 ? 65536 : get_sock_port(c->sock, 1); 1419 int local_port = c->sock == -1 ? 65536 : get_local_port(c->sock);
1420 char *remote_ipaddr = get_peer_ipaddr(c->sock); 1420 char *remote_ipaddr = get_peer_ipaddr(c->sock);
1421 int remote_port = get_peer_port(c->sock); 1421 int remote_port = get_peer_port(c->sock);
1422 1422
@@ -2935,7 +2935,7 @@ channel_setup_fwd_listener_tcpip(int type, struct Forward *fwd,
2935 if (type == SSH_CHANNEL_RPORT_LISTENER && fwd->listen_port == 0 && 2935 if (type == SSH_CHANNEL_RPORT_LISTENER && fwd->listen_port == 0 &&
2936 allocated_listen_port != NULL && 2936 allocated_listen_port != NULL &&
2937 *allocated_listen_port == 0) { 2937 *allocated_listen_port == 0) {
2938 *allocated_listen_port = get_sock_port(sock, 1); 2938 *allocated_listen_port = get_local_port(sock);
2939 debug("Allocated listen port %d", 2939 debug("Allocated listen port %d",
2940 *allocated_listen_port); 2940 *allocated_listen_port);
2941 } 2941 }