Commit f2661adc0c134d890d84c32d7cb54a2b4d1f0a5f

Authored by Jesper Dangaard Brouer
Committed by Pablo Neira Ayuso
1 parent 2690d97ade

netfilter: only warn once on wrong seqadj usage

Avoid potentially spamming the kernel log with WARN splash messages
when catching wrong usage of seqadj, by simply using WARN_ONCE.

This is a followup to commit db12cf274353 (netfilter: WARN about
wrong usage of sequence number adjustments)

Suggested-by: Flavio Leitner <fbl@redhat.com>
Suggested-by: Daniel Borkmann <dborkman@redhat.com>
Suggested-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>

Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff

net/netfilter/nf_conntrack_seqadj.c
... ... @@ -37,7 +37,7 @@
37 37 return 0;
38 38  
39 39 if (unlikely(!seqadj)) {
40   - WARN(1, "Wrong seqadj usage, missing nfct_seqadj_ext_add()\n");
  40 + WARN_ONCE(1, "Missing nfct_seqadj_ext_add() setup call\n");
41 41 return 0;
42 42 }
43 43