aboutsummaryrefslogtreecommitdiff
path: root/src/redirector.c
diff options
context:
space:
mode:
authorToni Uhlig <matzeton@googlemail.com>2018-06-27 22:49:37 +0200
committerToni Uhlig <matzeton@googlemail.com>2018-06-27 22:49:37 +0200
commit4394574e4b996322b802dff0cfe43bb980214cba (patch)
tree24d3075e46228373363c85ba41ce53edc66bbee7 /src/redirector.c
parentc37398b36468f05d45049ac4f14a3e3f40f2076f (diff)
protocol ssh login cache [+] login probability
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
Diffstat (limited to 'src/redirector.c')
-rw-r--r--src/redirector.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/redirector.c b/src/redirector.c
index de7e922..01f1eaf 100644
--- a/src/redirector.c
+++ b/src/redirector.c
@@ -272,6 +272,7 @@ static int redirector_accept_client(event_ctx *ev_ctx, int fd, void *user_data)
goto error;
}
+ /* DDoS protection */
ev_srv->last_accept_count++;
t = time(NULL);
d = difftime(t, ev_srv->last_accept_stamp);
@@ -282,7 +283,7 @@ static int redirector_accept_client(event_ctx *ev_ctx, int fd, void *user_data)
ev_srv->last_accept_count = 0;
}
if (ev_srv->last_accept_count / (size_t)d > 3) {
- W2("DoS protection: Got %zu accepts/s",
+ W2("DDoS protection: Got %zu accepts/s",
ev_srv->last_accept_count / (size_t)d);
goto error;
}