Fix handling of unsigned types

This commit is contained in:
Pavel Odintsov 2014-12-05 22:44:24 +03:00
parent 3f8a6d7b39
commit 1a6a0d5a8b

@ -2330,7 +2330,7 @@ void execute_ip_ban(uint32_t client_ip, map_element speed_element, unsigned int
}
// Detect attack direction with simple heuristic
if (abs(int(in_pps - out_pps)) < 1000) {
if (abs(int((int)in_pps - (int)out_pps)) < 1000) {
// If difference between pps speed is so small we should do additional investigation using bandwidth speed
if (in_bps > out_bps) {
data_direction = INCOMING;