删除IP Plugin表项时,未能及时更新ip_matcher,也未能正确同步uthash和ip_matcher的状态,导致ip_matcher返回了已被删除的ex_data。解决方案:
- 在IP Plugin的table runtime中增加垃圾回收队列,延迟删除EX_data,并延后ip_matcher在扫描线程的生效时机。 - 在scanner中增加ip_plugin_update_q_size,在IP Plugin的table runtime中增加changed_flag,以判断ip_matcher是否需要更新
This commit is contained in:
@@ -67,7 +67,7 @@ void Maat_garbage_collect_routine(struct Maat_garbage_bin* bin)
|
||||
for(p=TAILQ_FIRST(&bin->garbage_q); p!=NULL; p=tmp)
|
||||
{
|
||||
tmp=TAILQ_NEXT(p, entries);
|
||||
if(now-p->create_time>p->timeout)
|
||||
if(now-p->create_time>p->timeout || p->timeout==0)
|
||||
{
|
||||
p->garbage_free(p->garbage);
|
||||
TAILQ_REMOVE(&bin->garbage_q, p, entries);
|
||||
|
||||
Reference in New Issue
Block a user