mirror of
https://gitlab.com/openconnect/ocserv.git
synced 2026-02-10 16:57:00 +08:00
ban log: only log once when adding, not when increasing score when already banned
Signed-off-by: Stefan Bühler <stbuehler@web.de>
This commit is contained in:
@@ -155,9 +155,9 @@ int add_ip_to_ban_list(main_server_st *s, const unsigned char *ip, unsigned ip_s
|
||||
* periodically polls the server */
|
||||
if (e->score < GETCONFIG(s)->max_ban_score) {
|
||||
e->expires = expiration;
|
||||
print_msg = 0;
|
||||
} else
|
||||
print_msg = 1;
|
||||
} else
|
||||
print_msg = 0;
|
||||
|
||||
/* prevent overflow */
|
||||
e->score = (e->score + score) > e->score ? (e->score + score) : (e->score);
|
||||
|
||||
Reference in New Issue
Block a user