>From 146111514a8c126268e848e45b7dd967329b072f Mon Sep 17 00:00:00 2001 From: Tim Gardner <tim.gardner@xxxxxxxxxxxxx> Date: Thu, 18 Feb 2010 20:33:00 -0700 Subject: [PATCH] xt_recent: Fix false match. A rule with a zero hit_count will always match. Signed-off-by: Tim Gardner <tim.gardner@xxxxxxxxxxxxx> Cc: stable@xxxxxxxxxx --- net/netfilter/xt_recent.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/net/netfilter/xt_recent.c b/net/netfilter/xt_recent.c index 1bb0d6c..43e83a4 100644 --- a/net/netfilter/xt_recent.c +++ b/net/netfilter/xt_recent.c @@ -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; } -- 1.6.2.4 -- To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html