Commit 58368fc8 authored by Tim Gardner's avatar Tim Gardner Committed by Greg Kroah-Hartman

netfilter: xt_recent: fix false match

commit 8ccb92ad upstream.

A rule with a zero hit_count will always match.
Signed-off-by: default avatarTim Gardner <tim.gardner@canonical.com>
Signed-off-by: default avatarPatrick McHardy <kaber@trash.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 6f2deb6a
......@@ -260,7 +260,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%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment