gods

a simple blocklist for ssh
Log | Files | Refs | README | LICENSE

commit a883697fbae730cdbae13b427aaea1d11f4abe83
parent 9af015166c2b138c72ea077efa0e71d353afc1b0
Author: Naveen Narayanan <zerous@nocebo.space>
Date:   Sun, 10 Oct 2021 00:15:22 +0200

Add a member to struct attacker: list

list, as the name implies, shall represent the list
the attacker belongs to.

Diffstat:
Mattack.h | 7+++++++
Mmain.c | 1+
2 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/attack.h b/attack.h @@ -5,10 +5,17 @@ #include "queue.h" +enum list { + BLACK, + WHITE, + GREY, +}; + struct attacker { char ip[16]; int nban; /* [-1,8] */ time_t last; + enum list list; SLIST_ENTRY(attacker) attackers; }; diff --git a/main.c b/main.c @@ -52,6 +52,7 @@ init(struct attacker *a) strcpy(a->ip, ip); a->nban = -1; a->last = attack; + a->list = GREY; } /*