# HG changeset patch # User Matti Hamalainen # Date 1250367080 -10800 # Node ID f22cfa7617530951923a7d4e341f752ebcf30ea0 # Parent cb0a4b747cf0f24c8674519b002384f667288ac4 Update_blocklist() was setting timestamp of latest hit, this is incorrect as we do not know from whence entries already in netfilter are from. Fixed. diff -r cb0a4b747cf0 -r f22cfa761753 maltfilter --- a/maltfilter Sat Aug 15 23:05:29 2009 +0300 +++ b/maltfilter Sat Aug 15 23:11:20 2009 +0300 @@ -463,7 +463,7 @@ $blocklist{$2} = $mdate; } $newlist{$2} = $mdate; - update_entry(\%statlist, $mip, $mdate, "IPTABLES", ""); + update_entry(\%statlist, $mip, -1, "IPTABLES", ""); } } close(STATUS); @@ -525,15 +525,17 @@ $struct->{$mip}{"reason"}{$mclass}{"msg"} = $mreason; } - if (!defined($struct->{$mip}{"date1"})) { - $struct->{$mip}{"date1"} = $mdate; - } - $struct->{$mip}{"date2"} = $mdate; + if ($mdate > 0) { + if (!defined($struct->{$mip}{"date1"})) { + $struct->{$mip}{"date1"} = $mdate; + } + $struct->{$mip}{"date2"} = $mdate; - if (!defined($struct->{$mip}{"reason"}{$mclass}{"date2"})) { + if (!defined($struct->{$mip}{"reason"}{$mclass}{"date2"})) { + $struct->{$mip}{"reason"}{$mclass}{"date2"} = $mdate; + } $struct->{$mip}{"reason"}{$mclass}{"date2"} = $mdate; } - $struct->{$mip}{"reason"}{$mclass}{"date2"} = $mdate; return $cnt; }