summaryrefslogtreecommitdiff
path: root/sshd.c
diff options
context:
space:
mode:
authordjm <djm>2006-06-13 03:03:53 +0000
committerdjm <djm>2006-06-13 03:03:53 +0000
commit74b7b1d29979f2c372138840011617e46f476b7c (patch)
treefe78fe40b9a111f1b1714e1a28945c7f82ffd207 /sshd.c
parent80a918a94dab62bc0d15a98fa2451baf5bc4806d (diff)
downloadopenssh-74b7b1d29979f2c372138840011617e46f476b7c.tar.gz
- markus@cvs.openbsd.org 2006/06/01 09:21:48
[sshd.c] call get_remote_ipaddr() early; fixes logging after client disconnects; report mpf@; ok dtucker@
Diffstat (limited to 'sshd.c')
-rw-r--r--sshd.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/sshd.c b/sshd.c
index e707cf65..2bdda729 100644
--- a/sshd.c
+++ b/sshd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sshd.c,v 1.330 2006/03/25 13:17:02 djm Exp $ */
+/* $OpenBSD: sshd.c,v 1.331 2006/06/01 09:21:48 markus Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -1671,7 +1671,13 @@ main(int ac, char **av)
* We use get_canonical_hostname with usedns = 0 instead of
* get_remote_ipaddr here so IP options will be checked.
*/
- remote_ip = get_canonical_hostname(0);
+ (void) get_canonical_hostname(0);
+ /*
+ * The rest of the code depends on the fact that
+ * get_remote_ipaddr() caches the remote ip, even if
+ * the socket goes away.
+ */
+ remote_ip = get_remote_ipaddr();
#ifdef SSH_AUDIT_EVENTS
audit_connection_from(remote_ip, remote_port);