diff options
author | djm@openbsd.org <djm@openbsd.org> | 2016-03-07 19:02:43 +0000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2016-03-08 06:20:35 +1100 |
commit | 95767262caa6692eff1e1565be1f5cb297949a89 (patch) | |
tree | 1055360a328d0998dabb966f2e1002389f8c6c41 /servconf.c | |
parent | af0bb38ffd1f2c4f9f43b0029be2efe922815255 (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 'servconf.c')
-rw-r--r-- | servconf.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/servconf.c b/servconf.c index b19d30e18..ba39dce1d 100644 --- a/servconf.c +++ b/servconf.c | |||
@@ -1,5 +1,5 @@ | |||
1 | 1 | ||
2 | /* $OpenBSD: servconf.c,v 1.285 2016/02/17 05:29:04 djm Exp $ */ | 2 | /* $OpenBSD: servconf.c,v 1.286 2016/03/07 19:02:43 djm Exp $ */ |
3 | /* | 3 | /* |
4 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland | 4 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland |
5 | * All rights reserved | 5 | * All rights reserved |
@@ -706,14 +706,15 @@ process_queued_listen_addrs(ServerOptions *options) | |||
706 | struct connection_info * | 706 | struct connection_info * |
707 | get_connection_info(int populate, int use_dns) | 707 | get_connection_info(int populate, int use_dns) |
708 | { | 708 | { |
709 | struct ssh *ssh = active_state; /* XXX */ | ||
709 | static struct connection_info ci; | 710 | static struct connection_info ci; |
710 | 711 | ||
711 | if (!populate) | 712 | if (!populate) |
712 | return &ci; | 713 | return &ci; |
713 | ci.host = get_canonical_hostname(use_dns); | 714 | ci.host = auth_get_canonical_hostname(ssh, use_dns); |
714 | ci.address = get_remote_ipaddr(); | 715 | ci.address = ssh_remote_ipaddr(ssh); |
715 | ci.laddress = get_local_ipaddr(packet_get_connection_in()); | 716 | ci.laddress = ssh_local_ipaddr(ssh); |
716 | ci.lport = get_local_port(); | 717 | ci.lport = ssh_local_port(ssh); |
717 | return &ci; | 718 | return &ci; |
718 | } | 719 | } |
719 | 720 | ||