提交 8ccb92ad 编写于 作者: T Tim Gardner 提交者: Patrick McHardy

netfilter: xt_recent: fix false match

A rule with a zero hit_count will always match.
Signed-off-by: NTim Gardner <tim.gardner@canonical.com>
Cc: stable@kernel.org
Signed-off-by: NPatrick McHardy <kaber@trash.net>
上级 2c08522e
......@@ -267,7 +267,7 @@ recent_mt(const struct sk_buff *skb, const struct xt_match_param *par)
for (i = 0; i < e->nstamps; i++) {
if (info->seconds && time_after(time, e->stamps[i]))
continue;
if (++hits >= info->hit_count) {
if (info->hit_count && ++hits >= info->hit_count) {
ret = !ret;
break;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册