diff options
| author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-02-12 18:34:17 -0500 |
|---|---|---|
| committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-02-12 18:34:17 -0500 |
| commit | 89697f1d715e20fff0361cca79efd5a371623af7 (patch) | |
| tree | d64d279f6805fd3d5fb53f059cbe7ea1ae348592 | |
| parent | fd19e44f449f7e2e58d42d7bb6813e2292c38fba (diff) | |
| parent | 13fcfbb0675bf87da694f55dec11cada489a205c (diff) | |
Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6: (25 commits)
[XFRM]: Fix OOPSes in xfrm_audit_log().
[TCP]: cleanup of htcp (resend)
[TCP]: Use read mostly for CUBIC parameters.
[NETFILTER]: nf_conntrack_tcp: make sysctl variables static
[NETFILTER]: ip6t_mh: drop piggyback payload packet on MH packets
[NETFILTER]: Fix whitespace errors
[NETFILTER]: Kconfig: improve dependency handling
[NETFILTER]: xt_mac/xt_CLASSIFY: use IPv6 hook names for IPv6 registration
[NETFILTER]: nf_conntrack: change nf_conntrack_l[34]proto_unregister to void
[NETFILTER]: nf_conntrack: properly use RCU for nf_conntrack_destroyed callback
[NETFILTER]: ip_conntrack: properly use RCU for ip_conntrack_destroyed callback
[NETFILTER]: nf_conntrack: fix invalid conntrack statistics RCU assumption
[NETFILTER]: ip_conntrack: fix invalid conntrack statistics RCU assumption
[NETFILTER]: nf_conntrack: properly use RCU API for nf_ct_protos/nf_ct_l3protos arrays
[NETFILTER]: ip_conntrack: properly use RCU API for ip_ct_protos array
[NETFILTER]: nf_nat: properly use RCU API for nf_nat_protos array
[NETFILTER]: ip_nat: properly use RCU API for ip_nat_protos array
[NETFILTER]: nf_log: minor cleanups
[NETFILTER]: nf_log: switch logger registration/unregistration to mutex
[NETFILTER]: nf_log: make nf_log_unregister_pf return void
...
71 files changed, 768 insertions, 709 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. */ |
| 174 | int nf_log_register(int pf, struct nf_logger *logger); | 174 | int nf_log_register(int pf, struct nf_logger *logger); |
| 175 | int nf_log_unregister_pf(int pf); | 175 | void nf_log_unregister(struct nf_logger *logger); |
| 176 | void nf_log_unregister_logger(struct nf_logger *logger); | 176 | void nf_log_unregister_pf(int pf); |
| 177 | 177 | ||
| 178 | /* Calls the registered backend logging function */ | 178 | /* Calls the registered backend logging function */ |
| 179 | void nf_log_packet(int pf, | 179 | void 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; | |||
| 301 | extern int ip_conntrack_checksum; | 301 | extern 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) \ | ||
| 305 | do { \ | ||
| 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 | ||
| 258 | DECLARE_PER_CPU(struct ip_conntrack_stat, nf_conntrack_stat); | 258 | DECLARE_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) \ | ||
| 261 | do { \ | ||
| 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. */ |
| 91 | extern int nf_conntrack_l3proto_register(struct nf_conntrack_l3proto *proto); | 91 | extern int nf_conntrack_l3proto_register(struct nf_conntrack_l3proto *proto); |
| 92 | extern int nf_conntrack_l3proto_unregister(struct nf_conntrack_l3proto *proto); | 92 | extern void nf_conntrack_l3proto_unregister(struct nf_conntrack_l3proto *proto); |
| 93 | 93 | ||
| 94 | extern struct nf_conntrack_l3proto * | 94 | extern struct nf_conntrack_l3proto * |
| 95 | nf_ct_l3proto_find_get(u_int16_t l3proto); | 95 | nf_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]; | ||
