diff options
author | Jan Engelhardt <jengelh@medozas.de> | 2010-03-19 16:08:16 -0400 |
---|---|---|
committer | Jan Engelhardt <jengelh@medozas.de> | 2010-03-25 10:00:04 -0400 |
commit | ff67e4e42bd178b1179c4d8e5c1fde18758ce84f (patch) | |
tree | 5d4cc857d4bac40c3d78f90f8e21f12c424737a4 /net/bridge/netfilter/ebt_ulog.c | |
parent | 0d34545563f99886b997be7da63f0e8084af3bc5 (diff) |
netfilter: xt extensions: use pr_<level> (2)
Supplement to 1159683ef48469de71dc26f0ee1a9c30d131cf89.
Downgrade the log level to INFO for most checkentry messages as they
are, IMO, just an extra information to the -EINVAL code that is
returned as part of a parameter "constraint violation". Leave errors
to real errors, such as being unable to create a LED trigger.
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Diffstat (limited to 'net/bridge/netfilter/ebt_ulog.c')
-rw-r--r-- | net/bridge/netfilter/ebt_ulog.c | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/net/bridge/netfilter/ebt_ulog.c b/net/bridge/netfilter/ebt_ulog.c index 84340ab30ed..789ea36f1db 100644 --- a/net/bridge/netfilter/ebt_ulog.c +++ b/net/bridge/netfilter/ebt_ulog.c | |||
@@ -27,7 +27,7 @@ | |||
27 | * flushed even if it is not full yet. | 27 | * flushed even if it is not full yet. |
28 | * | 28 | * |
29 | */ | 29 | */ |
30 | 30 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | |
31 | #include <linux/module.h> | 31 | #include <linux/module.h> |
32 | #include <linux/spinlock.h> | 32 | #include <linux/spinlock.h> |
33 | #include <linux/socket.h> | 33 | #include <linux/socket.h> |
@@ -43,9 +43,6 @@ | |||
43 | #include <net/sock.h> | 43 | #include <net/sock.h> |
44 | #include "../br_private.h" | 44 | #include "../br_private.h" |
45 | 45 | ||
46 | #define PRINTR(format, args...) do { if (net_ratelimit()) \ | ||
47 | printk(format , ## args); } while (0) | ||
48 | |||
49 | static unsigned int nlbufsiz = NLMSG_GOODSIZE; | 46 | static unsigned int nlbufsiz = NLMSG_GOODSIZE; |
50 | module_param(nlbufsiz, uint, 0600); | 47 | module_param(nlbufsiz, uint, 0600); |
51 | MODULE_PARM_DESC(nlbufsiz, "netlink buffer size (number of bytes) " | 48 | MODULE_PARM_DESC(nlbufsiz, "netlink buffer size (number of bytes) " |
@@ -106,15 +103,14 @@ static struct sk_buff *ulog_alloc_skb(unsigned int size) | |||
106 | n = max(size, nlbufsiz); | 103 | n = max(size, nlbufsiz); |
107 | skb = alloc_skb(n, GFP_ATOMIC); | 104 | skb = alloc_skb(n, GFP_ATOMIC); |
108 | if (!skb) { | 105 | if (!skb) { |
109 | PRINTR(KERN_ERR "ebt_ulog: can't alloc whole buffer " | 106 | pr_debug("cannot alloc whole buffer of size %ub!\n", n); |
110 | "of size %ub!\n", n); | ||
111 | if (n > size) { | 107 | if (n > size) { |
112 | /* try to allocate only as much as we need for | 108 | /* try to allocate only as much as we need for |
113 | * current packet */ | 109 | * current packet */ |
114 | skb = alloc_skb(size, GFP_ATOMIC); | 110 | skb = alloc_skb(size, GFP_ATOMIC); |
115 | if (!skb) | 111 | if (!skb) |
116 | PRINTR(KERN_ERR "ebt_ulog: can't even allocate " | 112 | pr_debug("cannot even allocate " |
117 | "buffer of size %ub\n", size); | 113 | "buffer of size %ub\n", size); |
118 | } | 114 | } |
119 | } | 115 | } |
120 | 116 | ||
@@ -141,8 +137,7 @@ static void ebt_ulog_packet(unsigned int hooknr, const struct sk_buff *skb, | |||
141 | 137 | ||
142 | size = NLMSG_SPACE(sizeof(*pm) + copy_len); | 138 | size = NLMSG_SPACE(sizeof(*pm) + copy_len); |
143 | if (size > nlbufsiz) { | 139 | if (size > nlbufsiz) { |
144 | PRINTR("ebt_ulog: Size %Zd needed, but nlbufsiz=%d\n", | 140 | pr_debug("Size %Zd needed, but nlbufsiz=%d\n", size, nlbufsiz); |
145 | size, nlbufsiz); | ||
146 | return; | 141 | return; |
147 | } | 142 | } |
148 | 143 | ||
@@ -216,8 +211,8 @@ unlock: | |||
216 | return; | 211 | return; |
217 | 212 | ||
218 | nlmsg_failure: | 213 | nlmsg_failure: |
219 | printk(KERN_CRIT "ebt_ulog: error during NLMSG_PUT. This should " | 214 | pr_debug("error during NLMSG_PUT. This should " |
220 | "not happen, please report to author.\n"); | 215 | "not happen, please report to author.\n"); |
221 | goto unlock; | 216 | goto unlock; |
222 | alloc_failure: | 217 | alloc_failure: |
223 | goto unlock; | 218 | goto unlock; |
@@ -291,8 +286,8 @@ static int __init ebt_ulog_init(void) | |||
291 | int i; | 286 | int i; |
292 | 287 | ||
293 | if (nlbufsiz >= 128*1024) { | 288 | if (nlbufsiz >= 128*1024) { |
294 | printk(KERN_NOTICE "ebt_ulog: Netlink buffer has to be <= 128kB," | 289 | pr_warning("Netlink buffer has to be <= 128kB," |
295 | " please try a smaller nlbufsiz parameter.\n"); | 290 | " please try a smaller nlbufsiz parameter.\n"); |
296 | return -EINVAL; | 291 | return -EINVAL; |
297 | } | 292 | } |
298 | 293 | ||