aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/net/netfilter/nf_log.h6
-rw-r--r--net/bridge/netfilter/ebt_log.c2
-rw-r--r--net/bridge/netfilter/ebt_ulog.c2
-rw-r--r--net/ipv4/netfilter/ipt_LOG.c2
-rw-r--r--net/ipv6/netfilter/ip6t_LOG.c2
-rw-r--r--net/netfilter/nf_log.c10
-rw-r--r--net/netfilter/nfnetlink_log.c2
7 files changed, 13 insertions, 13 deletions
diff --git a/include/net/netfilter/nf_log.h b/include/net/netfilter/nf_log.h
index f0426e59f229..037e82403f91 100644
--- a/include/net/netfilter/nf_log.h
+++ b/include/net/netfilter/nf_log.h
@@ -43,8 +43,8 @@ struct nf_logger {
43}; 43};
44 44
45/* Function to register/unregister log function. */ 45/* Function to register/unregister log function. */
46int nf_log_register(int pf, struct nf_logger *logger); 46int nf_log_register(int pf, const struct nf_logger *logger);
47void nf_log_unregister(struct nf_logger *logger); 47void nf_log_unregister(const struct nf_logger *logger);
48void nf_log_unregister_pf(int pf); 48void nf_log_unregister_pf(int pf);
49 49
50/* Calls the registered backend logging function */ 50/* Calls the registered backend logging function */
@@ -53,7 +53,7 @@ void nf_log_packet(int pf,
53 const struct sk_buff *skb, 53 const struct sk_buff *skb,
54 const struct net_device *in, 54 const struct net_device *in,
55 const struct net_device *out, 55 const struct net_device *out,
56 struct nf_loginfo *li, 56 const struct nf_loginfo *li,
57 const char *fmt, ...); 57 const char *fmt, ...);
58 58
59#endif /* _NF_LOG_H */ 59#endif /* _NF_LOG_H */
diff --git a/net/bridge/netfilter/ebt_log.c b/net/bridge/netfilter/ebt_log.c
index fcb3b54dc191..3be9e9898553 100644
--- a/net/bridge/netfilter/ebt_log.c
+++ b/net/bridge/netfilter/ebt_log.c
@@ -183,7 +183,7 @@ static struct ebt_watcher log =
183 .me = THIS_MODULE, 183 .me = THIS_MODULE,
184}; 184};
185 185
186static struct nf_logger ebt_log_logger = { 186static const struct nf_logger ebt_log_logger = {
187 .name = "ebt_log", 187 .name = "ebt_log",
188 .logfn = &ebt_log_packet, 188 .logfn = &ebt_log_packet,
189 .me = THIS_MODULE, 189 .me = THIS_MODULE,
diff --git a/net/bridge/netfilter/ebt_ulog.c b/net/bridge/netfilter/ebt_ulog.c
index 1b9ca07f44ff..b73ba28bcbe8 100644
--- a/net/bridge/netfilter/ebt_ulog.c
+++ b/net/bridge/netfilter/ebt_ulog.c
@@ -279,7 +279,7 @@ static struct ebt_watcher ulog = {
279 .me = THIS_MODULE, 279 .me = THIS_MODULE,
280}; 280};
281 281
282static struct nf_logger ebt_ulog_logger = { 282static const struct nf_logger ebt_ulog_logger = {
283 .name = EBT_ULOG_WATCHER, 283 .name = EBT_ULOG_WATCHER,
284 .logfn = &ebt_log_packet, 284 .logfn = &ebt_log_packet,
285 .me = THIS_MODULE, 285 .me = THIS_MODULE,
diff --git a/net/ipv4/netfilter/ipt_LOG.c b/net/ipv4/netfilter/ipt_LOG.c
index 4b346e59bf2d..5acdddfa6add 100644
--- a/net/ipv4/netfilter/ipt_LOG.c
+++ b/net/ipv4/netfilter/ipt_LOG.c
@@ -465,7 +465,7 @@ static struct xt_target log_tg_reg __read_mostly = {
465 .me = THIS_MODULE, 465 .me = THIS_MODULE,
466}; 466};
467 467
468static struct nf_logger ipt_log_logger ={ 468static const struct nf_logger ipt_log_logger ={
469 .name = "ipt_LOG", 469 .name = "ipt_LOG",
470 .logfn = &ipt_log_packet, 470 .logfn = &ipt_log_packet,
471 .me = THIS_MODULE, 471 .me = THIS_MODULE,
diff --git a/net/ipv6/netfilter/ip6t_LOG.c b/net/ipv6/netfilter/ip6t_LOG.c
index e6a2b1e9469c..474c2b12621a 100644
--- a/net/ipv6/netfilter/ip6t_LOG.c
+++ b/net/ipv6/netfilter/ip6t_LOG.c
@@ -478,7 +478,7 @@ static struct xt_target log_tg6_reg __read_mostly = {
478 .me = THIS_MODULE, 478 .me = THIS_MODULE,
479}; 479};
480 480
481static struct nf_logger ip6t_logger = { 481static const struct nf_logger ip6t_logger = {
482 .name = "ip6t_LOG", 482 .name = "ip6t_LOG",
483 .logfn = &ip6t_log_packet, 483 .logfn = &ip6t_log_packet,
484 .me = THIS_MODULE, 484 .me = THIS_MODULE,
diff --git a/net/netfilter/nf_log.c b/net/netfilter/nf_log.c
index fad97d69481c..ed9116dc78b5 100644
--- a/net/netfilter/nf_log.c
+++ b/net/netfilter/nf_log.c
@@ -15,12 +15,12 @@
15 15
16#define NF_LOG_PREFIXLEN 128 16#define NF_LOG_PREFIXLEN 128
17 17
18static struct nf_logger *nf_loggers[NPROTO]; 18static const struct nf_logger *nf_loggers[NPROTO] __read_mostly;
19static DEFINE_MUTEX(nf_log_mutex); 19static DEFINE_MUTEX(nf_log_mutex);
20 20
21/* return EBUSY if somebody else is registered, EEXIST if the same logger 21/* return EBUSY if somebody else is registered, EEXIST if the same logger
22 * is registred, 0 on success. */ 22 * is registred, 0 on success. */
23int nf_log_register(int pf, struct nf_logger *logger) 23int nf_log_register(int pf, const struct nf_logger *logger)
24{ 24{
25 int ret; 25 int ret;
26 26
@@ -58,7 +58,7 @@ void nf_log_unregister_pf(int pf)
58} 58}
59EXPORT_SYMBOL(nf_log_unregister_pf); 59EXPORT_SYMBOL(nf_log_unregister_pf);
60 60
61void nf_log_unregister(struct nf_logger *logger) 61void nf_log_unregister(const struct nf_logger *logger)
62{ 62{
63 int i; 63 int i;
64 64
@@ -78,12 +78,12 @@ void nf_log_packet(int pf,
78 const struct sk_buff *skb, 78 const struct sk_buff *skb,
79 const struct net_device *in, 79 const struct net_device *in,
80 const struct net_device *out, 80 const struct net_device *out,
81 struct nf_loginfo *loginfo, 81 const struct nf_loginfo *loginfo,
82 const char *fmt, ...) 82 const char *fmt, ...)
83{ 83{
84 va_list args; 84 va_list args;
85 char prefix[NF_LOG_PREFIXLEN]; 85 char prefix[NF_LOG_PREFIXLEN];
86 struct nf_logger *logger; 86 const struct nf_logger *logger;
87 87
88 rcu_read_lock(); 88 rcu_read_lock();
89 logger = rcu_dereference(nf_loggers[pf]); 89 logger = rcu_dereference(nf_loggers[pf]);
diff --git a/net/netfilter/nfnetlink_log.c b/net/netfilter/nfnetlink_log.c
index 959a0cb131f1..02e63577e156 100644
--- a/net/netfilter/nfnetlink_log.c
+++ b/net/netfilter/nfnetlink_log.c
@@ -726,7 +726,7 @@ nfulnl_recv_unsupp(struct sock *ctnl, struct sk_buff *skb,
726 return -ENOTSUPP; 726 return -ENOTSUPP;
727} 727}
728 728
729static struct nf_logger nfulnl_logger = { 729static const struct nf_logger nfulnl_logger = {
730 .name = "nfnetlink_log", 730 .name = "nfnetlink_log",
731 .logfn = &nfulnl_log_packet, 731 .logfn = &nfulnl_log_packet,
732 .me = THIS_MODULE, 732 .me = THIS_MODULE,