Commit a81b2ce8508b9c57c2eae0b0ab7fc8a5e849a4b4
Committed by
Pablo Neira Ayuso
1 parent
5ebb335dcb
netfilter: Use LOGLEVEL_<FOO> defines
Use the #defines where appropriate. Miscellanea: Add explicit #include <linux/kernel.h> where it was not previously used so that these #defines are a bit more explicitly defined instead of indirectly included via: module.h->moduleparam.h->kernel.h Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Showing 6 changed files with 16 additions and 6 deletions Side-by-side Diff
net/ipv4/netfilter/nf_log_arp.c
... | ... | @@ -10,8 +10,10 @@ |
10 | 10 | * it under the terms of the GNU General Public License version 2 as |
11 | 11 | * published by the Free Software Foundation. |
12 | 12 | */ |
13 | + | |
13 | 14 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt |
14 | 15 | |
16 | +#include <linux/kernel.h> | |
15 | 17 | #include <linux/module.h> |
16 | 18 | #include <linux/spinlock.h> |
17 | 19 | #include <linux/skbuff.h> |
... | ... | @@ -27,7 +29,7 @@ |
27 | 29 | .type = NF_LOG_TYPE_LOG, |
28 | 30 | .u = { |
29 | 31 | .log = { |
30 | - .level = 5, | |
32 | + .level = LOGLEVEL_NOTICE, | |
31 | 33 | .logflags = NF_LOG_MASK, |
32 | 34 | }, |
33 | 35 | }, |
net/ipv4/netfilter/nf_log_ipv4.c
... | ... | @@ -5,8 +5,10 @@ |
5 | 5 | * it under the terms of the GNU General Public License version 2 as |
6 | 6 | * published by the Free Software Foundation. |
7 | 7 | */ |
8 | + | |
8 | 9 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt |
9 | 10 | |
11 | +#include <linux/kernel.h> | |
10 | 12 | #include <linux/module.h> |
11 | 13 | #include <linux/spinlock.h> |
12 | 14 | #include <linux/skbuff.h> |
... | ... | @@ -26,7 +28,7 @@ |
26 | 28 | .type = NF_LOG_TYPE_LOG, |
27 | 29 | .u = { |
28 | 30 | .log = { |
29 | - .level = 5, | |
31 | + .level = LOGLEVEL_NOTICE, | |
30 | 32 | .logflags = NF_LOG_MASK, |
31 | 33 | }, |
32 | 34 | }, |
net/ipv6/netfilter/ip6_tables.c
... | ... | @@ -9,7 +9,10 @@ |
9 | 9 | * it under the terms of the GNU General Public License version 2 as |
10 | 10 | * published by the Free Software Foundation. |
11 | 11 | */ |
12 | + | |
12 | 13 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt |
14 | + | |
15 | +#include <linux/kernel.h> | |
13 | 16 | #include <linux/capability.h> |
14 | 17 | #include <linux/in.h> |
15 | 18 | #include <linux/skbuff.h> |
... | ... | @@ -234,7 +237,7 @@ |
234 | 237 | .type = NF_LOG_TYPE_LOG, |
235 | 238 | .u = { |
236 | 239 | .log = { |
237 | - .level = 4, | |
240 | + .level = LOGLEVEL_WARNING, | |
238 | 241 | .logflags = NF_LOG_MASK, |
239 | 242 | }, |
240 | 243 | }, |
net/ipv6/netfilter/nf_log_ipv6.c
... | ... | @@ -5,8 +5,10 @@ |
5 | 5 | * it under the terms of the GNU General Public License version 2 as |
6 | 6 | * published by the Free Software Foundation. |
7 | 7 | */ |
8 | + | |
8 | 9 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt |
9 | 10 | |
11 | +#include <linux/kernel.h> | |
10 | 12 | #include <linux/module.h> |
11 | 13 | #include <linux/spinlock.h> |
12 | 14 | #include <linux/skbuff.h> |
... | ... | @@ -27,7 +29,7 @@ |
27 | 29 | .type = NF_LOG_TYPE_LOG, |
28 | 30 | .u = { |
29 | 31 | .log = { |
30 | - .level = 5, | |
32 | + .level = LOGLEVEL_NOTICE, | |
31 | 33 | .logflags = NF_LOG_MASK, |
32 | 34 | }, |
33 | 35 | }, |
net/netfilter/nf_tables_core.c
... | ... | @@ -8,6 +8,7 @@ |
8 | 8 | * Development of this code funded by Astaro AG (http://www.astaro.com/) |
9 | 9 | */ |
10 | 10 | |
11 | +#include <linux/kernel.h> | |
11 | 12 | #include <linux/module.h> |
12 | 13 | #include <linux/init.h> |
13 | 14 | #include <linux/list.h> |
... | ... | @@ -37,7 +38,7 @@ |
37 | 38 | .type = NF_LOG_TYPE_LOG, |
38 | 39 | .u = { |
39 | 40 | .log = { |
40 | - .level = 4, | |
41 | + .level = LOGLEVEL_WARNING, | |
41 | 42 | .logflags = NF_LOG_MASK, |
42 | 43 | }, |
43 | 44 | }, |
net/netfilter/nft_log.c