提交 50054a92 编写于 作者: J Jozsef Kadlecsik

Fix bug: sometimes valid entries in hash:* types of sets were evicted

Wrong index was used and therefore when shrinking a hash bucket at
deleting an entry, valid entries could be evicted as well.
Thanks to Eric Ewanco for the thorough bugreport.

Fixes netfilter bugzilla #1119
Signed-off-by: NJozsef Kadlecsik <kadlec@blackhole.kfki.hu>
上级 f95d7a46
...@@ -897,7 +897,7 @@ mtype_del(struct ip_set *set, void *value, const struct ip_set_ext *ext, ...@@ -897,7 +897,7 @@ mtype_del(struct ip_set *set, void *value, const struct ip_set_ext *ext,
continue; continue;
data = ahash_data(n, j, dsize); data = ahash_data(n, j, dsize);
memcpy(tmp->value + k * dsize, data, dsize); memcpy(tmp->value + k * dsize, data, dsize);
set_bit(j, tmp->used); set_bit(k, tmp->used);
k++; k++;
} }
tmp->pos = k; tmp->pos = k;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册