mirror of
https://github.com/pavel-odintsov/fastnetmon
synced 2024-11-24 02:46:36 +01:00
Close: #172. Fix bahaviour for unban
This commit is contained in:
parent
3fdd6c8472
commit
67a45a7606
@ -13,6 +13,7 @@ process_outgoing_traffic = on
|
||||
ban_details_records_count = 500
|
||||
|
||||
# How long we should stay IP in blocked state
|
||||
# If you set 0 here it completely disables unban capability
|
||||
ban_time = 1900
|
||||
|
||||
# How often we redraw client's screen
|
||||
|
@ -2108,7 +2108,8 @@ void cleanup_ban_list() {
|
||||
double time_difference = difftime(current_time, ((*itr).second).ban_timestamp);
|
||||
int ban_time = ((*itr).second).ban_time;
|
||||
|
||||
if (time_difference > ban_time) {
|
||||
// Zero value for ban_time means "no unban feature"
|
||||
if (ban_time != 0 && time_difference > ban_time) {
|
||||
// Cleanup all data related with this attack
|
||||
std::string data_direction_as_string = get_direction_name((*itr).second.attack_direction);
|
||||
std::string client_ip_as_string = convert_ip_as_uint_to_string(client_ip);
|
||||
|
Loading…
Reference in New Issue
Block a user