diff options
-rw-r--r-- | 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 fc70a49c0afd..1bb0d6c8438c 100644 --- a/net/netfilter/xt_recent.c +++ b/net/netfilter/xt_recent.c | |||
@@ -173,10 +173,10 @@ recent_entry_init(struct recent_table *t, const union nf_inet_addr *addr, | |||
173 | 173 | ||
174 | static void recent_entry_update(struct recent_table *t, struct recent_entry *e) | 174 | static void recent_entry_update(struct recent_table *t, struct recent_entry *e) |
175 | { | 175 | { |
176 | e->index %= ip_pkt_list_tot; | ||
176 | e->stamps[e->index++] = jiffies; | 177 | e->stamps[e->index++] = jiffies; |
177 | if (e->index > e->nstamps) | 178 | if (e->index > e->nstamps) |
178 | e->nstamps = e->index; | 179 | e->nstamps = e->index; |
179 | e->index %= ip_pkt_list_tot; | ||
180 | list_move_tail(&e->lru_list, &t->lru_list); | 180 | list_move_tail(&e->lru_list, &t->lru_list); |
181 | } | 181 | } |
182 | 182 | ||