summaryrefslogtreecommitdiff
path: root/servconf.c
diff options
context:
space:
mode:
authordjm@openbsd.org <djm@openbsd.org>2019-01-19 21:37:48 +0000
committerDamien Miller <djm@mindrot.org>2019-01-20 09:02:44 +1100
commit172a592a53ebe8649c4ac0d7946e6c08eb151af6 (patch)
treef7279c9f91927cc1c8517ebc61cccba00a29e4bb /servconf.c
parent8cc7a679d29cf6ecccfa08191e688c7f81ef95c2 (diff)
upstream: convert servconf.c to new packet API
with & ok markus@ OpenBSD-Commit-ID: 126553aecca302c9e02fd77e333b9cb217e623b4
Diffstat (limited to 'servconf.c')
-rw-r--r--servconf.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/servconf.c b/servconf.c
index 0ec095bd0..86c631bb0 100644
--- a/servconf.c
+++ b/servconf.c
@@ -1,5 +1,5 @@
1 1
2/* $OpenBSD: servconf.c,v 1.345 2019/01/19 21:31:32 djm Exp $ */ 2/* $OpenBSD: servconf.c,v 1.346 2019/01/19 21:37:48 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
@@ -65,9 +65,6 @@
65#include "myproposal.h" 65#include "myproposal.h"
66#include "digest.h" 66#include "digest.h"
67 67
68#include "opacket.h" /* XXX */
69extern struct ssh *active_state; /* XXX */
70
71static void add_listen_addr(ServerOptions *, const char *, 68static void add_listen_addr(ServerOptions *, const char *,
72 const char *, int); 69 const char *, int);
73static void add_one_listen_addr(ServerOptions *, const char *, 70static void add_one_listen_addr(ServerOptions *, const char *,
@@ -926,12 +923,11 @@ process_permitopen(struct ssh *ssh, ServerOptions *options)
926} 923}
927 924
928struct connection_info * 925struct connection_info *
929get_connection_info(int populate, int use_dns) 926get_connection_info(struct ssh *ssh, int populate, int use_dns)
930{ 927{
931 struct ssh *ssh = active_state; /* XXX */
932 static struct connection_info ci; 928 static struct connection_info ci;
933 929
934 if (!populate) 930 if (ssh == NULL || !populate)
935 return &ci; 931 return &ci;
936 ci.host = auth_get_canonical_hostname(ssh, use_dns); 932 ci.host = auth_get_canonical_hostname(ssh, use_dns);
937 ci.address = ssh_remote_ipaddr(ssh); 933 ci.address = ssh_remote_ipaddr(ssh);