diff options
author | Nicolas Dichtel <nicolas.dichtel@6wind.com> | 2016-10-18 08:37:32 -0400 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2016-10-20 13:59:53 -0400 |
commit | 7bb6615d395a7c130053728f3a64f6df6b2e1f18 (patch) | |
tree | 88743e3782a446dad54ef259598184f2c1aa9bf7 | |
parent | 1ecc281ec2f52d715dfc8cb67b6820ea813b9e52 (diff) |
netfilter: conntrack: restart gc immediately if GC_MAX_EVICTS is reached
When the maximum evictions number is reached, do not wait 5 seconds before
the next run.
CC: Florian Westphal <fw@strlen.de>
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Acked-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
-rw-r--r-- | net/netfilter/nf_conntrack_core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/netfilter/nf_conntrack_core.c b/net/netfilter/nf_conntrack_core.c index ba6a1d421222..df2f5a3901df 100644 --- a/net/netfilter/nf_conntrack_core.c +++ b/net/netfilter/nf_conntrack_core.c | |||
@@ -983,7 +983,7 @@ static void gc_worker(struct work_struct *work) | |||
983 | return; | 983 | return; |
984 | 984 | ||
985 | ratio = scanned ? expired_count * 100 / scanned : 0; | 985 | ratio = scanned ? expired_count * 100 / scanned : 0; |
986 | if (ratio >= 90) | 986 | if (ratio >= 90 || expired_count == GC_MAX_EVICTS) |
987 | next_run = 0; | 987 | next_run = 0; |
988 | 988 | ||
989 | gc_work->last_bucket = i; | 989 | gc_work->last_bucket = i; |