Skip to content

Commit

Permalink
netfilter: only warn once on wrong seqadj usage
Browse files Browse the repository at this point in the history
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 db12cf2 (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>
  • Loading branch information
Jesper Dangaard Brouer authored and Pablo Neira Ayuso committed Jan 6, 2014
1 parent 2690d97 commit f2661ad
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/netfilter/nf_conntrack_seqadj.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit f2661ad

Please sign in to comment.