summaryrefslogtreecommitdiff
path: root/sshd.c
diff options
context:
space:
mode:
Diffstat (limited to 'sshd.c')
-rw-r--r--sshd.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sshd.c b/sshd.c
index e782a99f2..9d193c9eb 100644
--- a/sshd.c
+++ b/sshd.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: sshd.c,v 1.539 2019/10/31 21:23:19 djm Exp $ */ 1/* $OpenBSD: sshd.c,v 1.540 2019/11/13 11:25:11 dtucker Exp $ */
2/* 2/*
3 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -1154,6 +1154,7 @@ server_accept_loop(int *sock_in, int *sock_out, int *newsock, int *config_s)
1154 if (drop_connection(startups) == 1) { 1154 if (drop_connection(startups) == 1) {
1155 char *laddr = get_local_ipaddr(*newsock); 1155 char *laddr = get_local_ipaddr(*newsock);
1156 char *raddr = get_peer_ipaddr(*newsock); 1156 char *raddr = get_peer_ipaddr(*newsock);
1157 char msg[] = "Exceeded MaxStartups\r\n";
1157 1158
1158 verbose("drop connection #%d from [%s]:%d " 1159 verbose("drop connection #%d from [%s]:%d "
1159 "on [%s]:%d past MaxStartups", startups, 1160 "on [%s]:%d past MaxStartups", startups,
@@ -1161,6 +1162,8 @@ server_accept_loop(int *sock_in, int *sock_out, int *newsock, int *config_s)
1161 laddr, get_local_port(*newsock)); 1162 laddr, get_local_port(*newsock));
1162 free(laddr); 1163 free(laddr);
1163 free(raddr); 1164 free(raddr);
1165 /* best-effort notification to client */
1166 (void)write(*newsock, msg, strlen(msg));
1164 close(*newsock); 1167 close(*newsock);
1165 continue; 1168 continue;
1166 } 1169 }