netfilter: only warn once on wrong seqadj usage
authorJesper Dangaard Brouer <brouer@redhat.com>
Sat, 4 Jan 2014 13:10:43 +0000 (14:10 +0100)
committerPablo Neira Ayuso <pablo@netfilter.org>
Mon, 6 Jan 2014 13:23:17 +0000 (14:23 +0100)
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>
net/netfilter/nf_conntrack_seqadj.c

index b2d38da6782201862eb29321c921dd254e8408f3..f6e2ae91a80badd697a1f77e299dc332bc34a8d1 100644 (file)
@@ -37,7 +37,7 @@ int nf_ct_seqadj_set(struct nf_conn *ct, enum ip_conntrack_info ctinfo,
                return 0;
 
        if (unlikely(!seqadj)) {
-               WARN(1, "Wrong seqadj usage, missing nfct_seqadj_ext_add()\n");
+               WARN_ONCE(1, "Missing nfct_seqadj_ext_add() setup call\n");
                return 0;
        }