diff options
author | Damien Miller <djm@cvs.openbsd.org> | 2016-12-09 03:04:30 +0000 |
---|---|---|
committer | Damien Miller <djm@cvs.openbsd.org> | 2016-12-09 03:04:30 +0000 |
commit | e64fd778df15c19f3d367f623ef805692fa046de (patch) | |
tree | bebd36902a48ace474d005e225ccdfae29b6b2ec /usr.bin/ssh | |
parent | d257a5f49537a5472e27d86470ee824936efd9ca (diff) |
log connections dropped in excess of MaxStartups at verbose LogLevel;
bz#2613 based on diff from Tomas Kuthan; ok dtucker@
Diffstat (limited to 'usr.bin/ssh')
-rw-r--r-- | usr.bin/ssh/sshd.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/usr.bin/ssh/sshd.c b/usr.bin/ssh/sshd.c index 4f0cee7cb85..b3bc26468a4 100644 --- a/usr.bin/ssh/sshd.c +++ b/usr.bin/ssh/sshd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sshd.c,v 1.479 2016/12/04 22:27:25 dtucker Exp $ */ +/* $OpenBSD: sshd.c,v 1.480 2016/12/09 03:04:29 djm Exp $ */ /* * Author: Tatu Ylonen <ylo@cs.hut.fi> * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland @@ -1117,7 +1117,15 @@ server_accept_loop(int *sock_in, int *sock_out, int *newsock, int *config_s) continue; } if (drop_connection(startups) == 1) { - debug("drop connection #%d", startups); + char *laddr = get_local_ipaddr(*newsock); + char *raddr = get_peer_ipaddr(*newsock); + + verbose("drop connection #%d from [%s]:%d " + "on [%s]:%d past MaxStartups", startups, + raddr, get_peer_port(*newsock), + laddr, get_local_port(*newsock)); + free(laddr); + free(raddr); close(*newsock); continue; } |