diff options
author | David S. Miller <davem@davemloft.net> | 2010-02-25 02:23:37 (GMT) |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-02-25 02:23:37 (GMT) |
commit | 54831a83bfe656c4c54e287c734c6b0ccaa3719b (patch) | |
tree | abd5bef16d1a6011f629a36d4e245a2ed4f3df3c /net/netfilter/xt_recent.c | |
parent | fb977e2ca607a7e74946a1de798f474d1b80b9d6 (diff) | |
parent | 0f234214d15fa914436d304ecf5c3e43449e79f9 (diff) | |
download | linux-fsl-qoriq-54831a83bfe656c4c54e287c734c6b0ccaa3719b.tar.xz |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/kaber/nf-next-2.6
Diffstat (limited to 'net/netfilter/xt_recent.c')
-rw-r--r-- | net/netfilter/xt_recent.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/netfilter/xt_recent.c b/net/netfilter/xt_recent.c index 132cfaa..7073dbb 100644 --- a/net/netfilter/xt_recent.c +++ b/net/netfilter/xt_recent.c @@ -177,10 +177,10 @@ recent_entry_init(struct recent_table *t, const union nf_inet_addr *addr, static void recent_entry_update(struct recent_table *t, struct recent_entry *e) { + e->index %= ip_pkt_list_tot; e->stamps[e->index++] = jiffies; if (e->index > e->nstamps) e->nstamps = e->index; - e->index %= ip_pkt_list_tot; list_move_tail(&e->lru_list, &t->lru_list); } @@ -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; } |