提交 f2661adc 编写于 作者: J Jesper Dangaard Brouer 提交者: Pablo Neira Ayuso

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 db12cf27 (netfilter: WARN about
wrong usage of sequence number adjustments)
Suggested-by: NFlavio Leitner <fbl@redhat.com>
Suggested-by: NDaniel Borkmann <dborkman@redhat.com>
Suggested-by: NFlorian Westphal <fw@strlen.de>
Signed-off-by: NJesper Dangaard Brouer <brouer@redhat.com>
Signed-off-by: NPablo Neira Ayuso <pablo@netfilter.org>
上级 2690d97a
...@@ -37,7 +37,7 @@ int nf_ct_seqadj_set(struct nf_conn *ct, enum ip_conntrack_info ctinfo, ...@@ -37,7 +37,7 @@ int nf_ct_seqadj_set(struct nf_conn *ct, enum ip_conntrack_info ctinfo,
return 0; return 0;
if (unlikely(!seqadj)) { 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; return 0;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册