comparison src/syslogconfig.cpp @ 79:831d0b46bbd2 stable-1-0-18

add more logging when blocked addresses move to higher scale values
author Carl Byington <carl@five-ten-sg.com>
date Wed, 15 Jul 2020 14:22:37 -0700
parents c6c8a2102a3e
children
comparison
equal deleted inserted replaced
78:fadead7c9142 79:831d0b46bbd2
88 // good authentication (count<0) prevents blocking 88 // good authentication (count<0) prevents blocking
89 // not much point in blocking for more than a month 89 // not much point in blocking for more than a month
90 b.count += amount; 90 b.count += amount;
91 int threshold = con.get_threshold(); 91 int threshold = con.get_threshold();
92 if (b.blocked) { 92 if (b.blocked) {
93 int effective_scale = 1; 93 int effective_scale = 2;
94 while (original_amount * effective_scale < b.count) { 94 while (original_amount * effective_scale < b.count) {
95 effective_scale = effective_scale * 3 / 2; 95 effective_scale = effective_scale * 3 / 2;
96 } 96 }
97 if (effective_scale > b.max_scale) { 97 if (effective_scale > b.max_scale) {
98 b.max_scale = effective_scale; 98 b.max_scale = effective_scale;