Commit e016c5e4 authored by Florian Westphal's avatar Florian Westphal Committed by Pablo Neira Ayuso

netfilter: xt_NFQUEUE: use pr ratelimiting

switch this to info, since these aren't really errors.
We only use printk because we cannot report meaningful errors
in the xtables framework.
Signed-off-by: default avatarFlorian Westphal <fw@strlen.de>
Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
parent 11f7aee2
...@@ -8,6 +8,8 @@ ...@@ -8,6 +8,8 @@
* *
*/ */
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
#include <linux/module.h> #include <linux/module.h>
#include <linux/skbuff.h> #include <linux/skbuff.h>
...@@ -67,13 +69,13 @@ static int nfqueue_tg_check(const struct xt_tgchk_param *par) ...@@ -67,13 +69,13 @@ static int nfqueue_tg_check(const struct xt_tgchk_param *par)
init_hashrandom(&jhash_initval); init_hashrandom(&jhash_initval);
if (info->queues_total == 0) { if (info->queues_total == 0) {
pr_err("NFQUEUE: number of total queues is 0\n"); pr_info_ratelimited("number of total queues is 0\n");
return -EINVAL; return -EINVAL;
} }
maxid = info->queues_total - 1 + info->queuenum; maxid = info->queues_total - 1 + info->queuenum;
if (maxid > 0xffff) { if (maxid > 0xffff) {
pr_err("NFQUEUE: number of queues (%u) out of range (got %u)\n", pr_info_ratelimited("number of queues (%u) out of range (got %u)\n",
info->queues_total, maxid); info->queues_total, maxid);
return -ERANGE; return -ERANGE;
} }
if (par->target->revision == 2 && info->flags > 1) if (par->target->revision == 2 && info->flags > 1)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment