diff options
author | 2006-06-01 09:21:48 +0000 | |
---|---|---|
committer | 2006-06-01 09:21:48 +0000 | |
commit | c742906af4adba7d5e6ffe3f4c3b69f5a5e2aa07 (patch) | |
tree | 41853f4188d5c702e483899396881b6337d55190 | |
parent | formatting (diff) | |
download | wireguard-openbsd-c742906af4adba7d5e6ffe3f4c3b69f5a5e2aa07.tar.xz wireguard-openbsd-c742906af4adba7d5e6ffe3f4c3b69f5a5e2aa07.zip |
call get_remote_ipaddr() early; fixes logging after client disconnects;
report mpf@; ok dtucker@
-rw-r--r-- | usr.bin/ssh/sshd.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/usr.bin/ssh/sshd.c b/usr.bin/ssh/sshd.c index 2db6fe6c582..1291849cfaa 100644 --- a/usr.bin/ssh/sshd.c +++ b/usr.bin/ssh/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 @@ -1587,7 +1587,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 LIBWRAP /* Check whether logins are denied from this host. */ |