aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/linux/netfilter.h4
-rw-r--r--include/linux/netfilter_ipv4/ip_conntrack.h6
-rw-r--r--include/net/netfilter/nf_conntrack.h6
-rw-r--r--include/net/netfilter/nf_conntrack_l3proto.h4
-rw-r--r--include/net/netfilter/nf_conntrack_l4proto.h2
5 files changed, 17 insertions, 5 deletions
diff --git a/include/linux/netfilter.h b/include/linux/netfilter.h
index d4c4c5120bc0..70d3b4f1e48d 100644
--- a/include/linux/netfilter.h
+++ b/include/linux/netfilter.h
@@ -172,8 +172,8 @@ struct nf_logger {
172 172
173/* Function to register/unregister log function. */ 173/* Function to register/unregister log function. */
174int nf_log_register(int pf, struct nf_logger *logger); 174int nf_log_register(int pf, struct nf_logger *logger);
175int nf_log_unregister_pf(int pf); 175void nf_log_unregister(struct nf_logger *logger);
176void nf_log_unregister_logger(struct nf_logger *logger); 176void nf_log_unregister_pf(int pf);
177 177
178/* Calls the registered backend logging function */ 178/* Calls the registered backend logging function */
179void nf_log_packet(int pf, 179void nf_log_packet(int pf,
diff --git a/include/linux/netfilter_ipv4/ip_conntrack.h b/include/linux/netfilter_ipv4/ip_conntrack.h
index 33581c13d947..da9274e6bf12 100644
--- a/include/linux/netfilter_ipv4/ip_conntrack.h
+++ b/include/linux/netfilter_ipv4/ip_conntrack.h
@@ -301,6 +301,12 @@ extern unsigned int ip_conntrack_htable_size;
301extern int ip_conntrack_checksum; 301extern int ip_conntrack_checksum;
302 302
303#define CONNTRACK_STAT_INC(count) (__get_cpu_var(ip_conntrack_stat).count++) 303#define CONNTRACK_STAT_INC(count) (__get_cpu_var(ip_conntrack_stat).count++)
304#define CONNTRACK_STAT_INC_ATOMIC(count) \
305do { \
306 local_bh_disable(); \
307 __get_cpu_var(ip_conntrack_stat).count++; \
308 local_bh_enable(); \
309} while (0)
304 310
305#ifdef CONFIG_IP_NF_CONNTRACK_EVENTS 311#ifdef CONFIG_IP_NF_CONNTRACK_EVENTS
306#include <linux/notifier.h> 312#include <linux/notifier.h>
diff --git a/include/net/netfilter/nf_conntrack.h b/include/net/netfilter/nf_conntrack.h
index 68ec27490c20..0e690e34c00b 100644
--- a/include/net/netfilter/nf_conntrack.h
+++ b/include/net/netfilter/nf_conntrack.h
@@ -257,6 +257,12 @@ extern int nf_conntrack_max;
257 257
258DECLARE_PER_CPU(struct ip_conntrack_stat, nf_conntrack_stat); 258DECLARE_PER_CPU(struct ip_conntrack_stat, nf_conntrack_stat);
259#define NF_CT_STAT_INC(count) (__get_cpu_var(nf_conntrack_stat).count++) 259#define NF_CT_STAT_INC(count) (__get_cpu_var(nf_conntrack_stat).count++)
260#define NF_CT_STAT_INC_ATOMIC(count) \
261do { \
262 local_bh_disable(); \
263 __get_cpu_var(nf_conntrack_stat).count++; \
264 local_bh_enable(); \
265} while (0)
260 266
261/* no helper, no nat */ 267/* no helper, no nat */
262#define NF_CT_F_BASIC 0 268#define NF_CT_F_BASIC 0
diff --git a/include/net/netfilter/nf_conntrack_l3proto.h b/include/net/netfilter/nf_conntrack_l3proto.h
index 664ddcffe00d..eb575cbd4c95 100644
--- a/include/net/netfilter/nf_conntrack_l3proto.h
+++ b/include/net/netfilter/nf_conntrack_l3proto.h
@@ -89,7 +89,7 @@ extern struct nf_conntrack_l3proto *nf_ct_l3protos[AF_MAX];
89 89
90/* Protocol registration. */ 90/* Protocol registration. */
91extern int nf_conntrack_l3proto_register(struct nf_conntrack_l3proto *proto); 91extern int nf_conntrack_l3proto_register(struct nf_conntrack_l3proto *proto);
92extern int nf_conntrack_l3proto_unregister(struct nf_conntrack_l3proto *proto); 92extern void nf_conntrack_l3proto_unregister(struct nf_conntrack_l3proto *proto);
93 93
94extern struct nf_conntrack_l3proto * 94extern struct nf_conntrack_l3proto *
95nf_ct_l3proto_find_get(u_int16_t l3proto); 95nf_ct_l3proto_find_get(u_int16_t l3proto);
@@ -106,7 +106,7 @@ __nf_ct_l3proto_find(u_int16_t l3proto)
106{ 106{
107 if (unlikely(l3proto >= AF_MAX)) 107 if (unlikely(l3proto >= AF_MAX))
108 return &nf_conntrack_l3proto_generic; 108 return &nf_conntrack_l3proto_generic;
109 return nf_ct_l3protos[l3proto]; 109 return rcu_dereference(nf_ct_l3protos[l3proto]);
110} 110}
111 111
112#endif /*_NF_CONNTRACK_L3PROTO_H*/ 112#endif /*_NF_CONNTRACK_L3PROTO_H*/
diff --git a/include/net/netfilter/nf_conntrack_l4proto.h b/include/net/netfilter/nf_conntrack_l4proto.h
index fc8af08ff542..8415182ec126 100644
--- a/include/net/netfilter/nf_conntrack_l4proto.h
+++ b/include/net/netfilter/nf_conntrack_l4proto.h
@@ -109,7 +109,7 @@ extern void nf_ct_l4proto_put(struct nf_conntrack_l4proto *p);
109 109
110/* Protocol registration. */ 110/* Protocol registration. */
111extern int nf_conntrack_l4proto_register(struct nf_conntrack_l4proto *proto); 111extern int nf_conntrack_l4proto_register(struct nf_conntrack_l4proto *proto);
112extern int nf_conntrack_l4proto_unregister(struct nf_conntrack_l4proto *proto); 112extern void nf_conntrack_l4proto_unregister(struct nf_conntrack_l4proto *proto);
113 113
114/* Generic netlink helpers */ 114/* Generic netlink helpers */
115extern int nf_ct_port_tuple_to_nfattr(struct sk_buff *skb, 115extern int nf_ct_port_tuple_to_nfattr(struct sk_buff *skb,