netfilter: xt_recent: fix false match

A rule with a zero hit_count will always match.

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Cc: stable@kernel.org
Signed-off-by: Patrick McHardy <kaber@trash.net>
This commit is contained in:
Tim Gardner 2010-02-23 14:59:12 +01:00 committed by Patrick McHardy
parent 2c08522e5d
commit 8ccb92ad41
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}