diff options
author | Florian Westphal <fw@strlen.de> | 2018-02-09 09:52:02 -0500 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2018-02-14 15:05:35 -0500 |
commit | e016c5e43db51875c2b541b59bd217494d213174 (patch) | |
tree | 10fa6971459a8861b7eaa9c36188dd2dea137b03 | |
parent | 11f7aee2326f37f9d3abba27bb61d92ec09fbfde (diff) |
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: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
-rw-r--r-- | net/netfilter/xt_NFQUEUE.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/net/netfilter/xt_NFQUEUE.c b/net/netfilter/xt_NFQUEUE.c index a360b99a958a..a9aca80a32ae 100644 --- a/net/netfilter/xt_NFQUEUE.c +++ b/net/netfilter/xt_NFQUEUE.c | |||
@@ -8,6 +8,8 @@ | |||
8 | * | 8 | * |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
12 | |||
11 | #include <linux/module.h> | 13 | #include <linux/module.h> |
12 | #include <linux/skbuff.h> | 14 | #include <linux/skbuff.h> |
13 | 15 | ||
@@ -67,13 +69,13 @@ static int nfqueue_tg_check(const struct xt_tgchk_param *par) | |||
67 | init_hashrandom(&jhash_initval); | 69 | init_hashrandom(&jhash_initval); |
68 | 70 | ||
69 | if (info->queues_total == 0) { | 71 | if (info->queues_total == 0) { |
70 | pr_err("NFQUEUE: number of total queues is 0\n"); | 72 | pr_info_ratelimited("number of total queues is 0\n"); |
71 | return -EINVAL; | 73 | return -EINVAL; |
72 | } | 74 | } |
73 | maxid = info->queues_total - 1 + info->queuenum; | 75 | maxid = info->queues_total - 1 + info->queuenum; |
74 | if (maxid > 0xffff) { | 76 | if (maxid > 0xffff) { |
75 | pr_err("NFQUEUE: number of queues (%u) out of range (got %u)\n", | 77 | pr_info_ratelimited("number of queues (%u) out of range (got %u)\n", |
76 | info->queues_total, maxid); | 78 | info->queues_total, maxid); |
77 | return -ERANGE; | 79 | return -ERANGE; |
78 | } | 80 | } |
79 | if (par->target->revision == 2 && info->flags > 1) | 81 | if (par->target->revision == 2 && info->flags > 1) |