diff options
author | Patrick McHardy <kaber@trash.net> | 2007-07-14 23:48:19 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2007-07-14 23:48:19 -0400 |
commit | 61075af51f252913401c41fbe94075b46c94e9f1 (patch) | |
tree | bf97f2a5ed93ed1767953b0ae8678d921ebc0473 | |
parent | 370786f9cfd430cb424f00ce4110e75bb1b95a19 (diff) |
[NETFILTER]: nf_conntrack: mark protocols __read_mostly
Also remove two unnecessary EXPORT_SYMBOLs and move the
nf_conntrack_l3proto_ipv4 declaration to the correct file.
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | include/net/netfilter/ipv4/nf_conntrack_ipv4.h | 2 | ||||
-rw-r--r-- | include/net/netfilter/nf_conntrack_l3proto.h | 2 | ||||
-rw-r--r-- | net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c | 2 | ||||
-rw-r--r-- | net/ipv4/netfilter/nf_conntrack_proto_icmp.c | 3 | ||||
-rw-r--r-- | net/ipv6/netfilter/nf_conntrack_l3proto_ipv6.c | 2 | ||||
-rw-r--r-- | net/ipv6/netfilter/nf_conntrack_proto_icmpv6.c | 4 | ||||
-rw-r--r-- | net/netfilter/nf_conntrack_l3proto_generic.c | 2 | ||||
-rw-r--r-- | net/netfilter/nf_conntrack_proto_generic.c | 2 | ||||
-rw-r--r-- | net/netfilter/nf_conntrack_proto_gre.c | 2 | ||||
-rw-r--r-- | net/netfilter/nf_conntrack_proto_sctp.c | 4 | ||||
-rw-r--r-- | net/netfilter/nf_conntrack_proto_tcp.c | 4 | ||||
-rw-r--r-- | net/netfilter/nf_conntrack_proto_udp.c | 4 |
12 files changed, 15 insertions, 18 deletions
diff --git a/include/net/netfilter/ipv4/nf_conntrack_ipv4.h b/include/net/netfilter/ipv4/nf_conntrack_ipv4.h index 3ed4e14970c5..7a671603fca6 100644 --- a/include/net/netfilter/ipv4/nf_conntrack_ipv4.h +++ b/include/net/netfilter/ipv4/nf_conntrack_ipv4.h | |||
@@ -12,6 +12,8 @@ | |||
12 | /* Returns new sk_buff, or NULL */ | 12 | /* Returns new sk_buff, or NULL */ |
13 | struct sk_buff *nf_ct_ipv4_ct_gather_frags(struct sk_buff *skb); | 13 | struct sk_buff *nf_ct_ipv4_ct_gather_frags(struct sk_buff *skb); |
14 | 14 | ||
15 | extern struct nf_conntrack_l3proto nf_conntrack_l3proto_ipv4; | ||
16 | |||
15 | extern struct nf_conntrack_l4proto nf_conntrack_l4proto_tcp4; | 17 | extern struct nf_conntrack_l4proto nf_conntrack_l4proto_tcp4; |
16 | extern struct nf_conntrack_l4proto nf_conntrack_l4proto_udp4; | 18 | extern struct nf_conntrack_l4proto nf_conntrack_l4proto_udp4; |
17 | extern struct nf_conntrack_l4proto nf_conntrack_l4proto_icmp; | 19 | extern struct nf_conntrack_l4proto nf_conntrack_l4proto_icmp; |
diff --git a/include/net/netfilter/nf_conntrack_l3proto.h b/include/net/netfilter/nf_conntrack_l3proto.h index e3708a698d8b..3c58a2c4df28 100644 --- a/include/net/netfilter/nf_conntrack_l3proto.h +++ b/include/net/netfilter/nf_conntrack_l3proto.h | |||
@@ -89,8 +89,6 @@ extern struct nf_conntrack_l3proto *nf_ct_l3proto_find_get(u_int16_t l3proto); | |||
89 | extern void nf_ct_l3proto_put(struct nf_conntrack_l3proto *p); | 89 | extern void nf_ct_l3proto_put(struct nf_conntrack_l3proto *p); |
90 | 90 | ||
91 | /* Existing built-in protocols */ | 91 | /* Existing built-in protocols */ |
92 | extern struct nf_conntrack_l3proto nf_conntrack_l3proto_ipv4; | ||
93 | extern struct nf_conntrack_l3proto nf_conntrack_l3proto_ipv6; | ||
94 | extern struct nf_conntrack_l3proto nf_conntrack_l3proto_generic; | 92 | extern struct nf_conntrack_l3proto nf_conntrack_l3proto_generic; |
95 | 93 | ||
96 | static inline struct nf_conntrack_l3proto * | 94 | static inline struct nf_conntrack_l3proto * |
diff --git a/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c b/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c index ee29f4e9eac2..64552afd01cb 100644 --- a/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c +++ b/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c | |||
@@ -405,7 +405,7 @@ static struct nf_sockopt_ops so_getorigdst = { | |||
405 | .get = &getorigdst, | 405 | .get = &getorigdst, |
406 | }; | 406 | }; |
407 | 407 | ||
408 | struct nf_conntrack_l3proto nf_conntrack_l3proto_ipv4 = { | 408 | struct nf_conntrack_l3proto nf_conntrack_l3proto_ipv4 __read_mostly = { |
409 | .l3proto = PF_INET, | 409 | .l3proto = PF_INET, |
410 | .name = "ipv4", | 410 | .name = "ipv4", |
411 | .pkt_to_tuple = ipv4_pkt_to_tuple, | 411 | .pkt_to_tuple = ipv4_pkt_to_tuple, |
diff --git a/net/ipv4/netfilter/nf_conntrack_proto_icmp.c b/net/ipv4/netfilter/nf_conntrack_proto_icmp.c index f96573304f5b..6593fd2c5b10 100644 --- a/net/ipv4/netfilter/nf_conntrack_proto_icmp.c +++ b/net/ipv4/netfilter/nf_conntrack_proto_icmp.c | |||
@@ -312,7 +312,7 @@ static struct ctl_table icmp_compat_sysctl_table[] = { | |||
312 | #endif /* CONFIG_NF_CONNTRACK_PROC_COMPAT */ | 312 | #endif /* CONFIG_NF_CONNTRACK_PROC_COMPAT */ |
313 | #endif /* CONFIG_SYSCTL */ | 313 | #endif /* CONFIG_SYSCTL */ |
314 | 314 | ||
315 | struct nf_conntrack_l4proto nf_conntrack_l4proto_icmp = | 315 | struct nf_conntrack_l4proto nf_conntrack_l4proto_icmp __read_mostly = |
316 | { | 316 | { |
317 | .l3proto = PF_INET, | 317 | .l3proto = PF_INET, |
318 | .l4proto = IPPROTO_ICMP, | 318 | .l4proto = IPPROTO_ICMP, |
@@ -338,4 +338,3 @@ struct nf_conntrack_l4proto nf_conntrack_l4proto_icmp = | |||
338 | #endif | 338 | #endif |
339 | #endif | 339 | #endif |
340 | }; | 340 | }; |
341 | EXPORT_SYMBOL_GPL(nf_conntrack_l4proto_icmp); | ||
diff --git a/net/ipv6/netfilter/nf_conntrack_l3proto_ipv6.c b/net/ipv6/netfilter/nf_conntrack_l3proto_ipv6.c index 9b7eaaadc67e..36df2218b669 100644 --- a/net/ipv6/netfilter/nf_conntrack_l3proto_ipv6.c +++ b/net/ipv6/netfilter/nf_conntrack_l3proto_ipv6.c | |||
@@ -373,7 +373,7 @@ static int ipv6_nfattr_to_tuple(struct nfattr *tb[], | |||
373 | } | 373 | } |
374 | #endif | 374 | #endif |
375 | 375 | ||
376 | struct nf_conntrack_l3proto nf_conntrack_l3proto_ipv6 = { | 376 | struct nf_conntrack_l3proto nf_conntrack_l3proto_ipv6 __read_mostly = { |
377 | .l3proto = PF_INET6, | 377 | .l3proto = PF_INET6, |
378 | .name = "ipv6", | 378 | .name = "ipv6", |
379 | .pkt_to_tuple = ipv6_pkt_to_tuple, | 379 | .pkt_to_tuple = ipv6_pkt_to_tuple, |
diff --git a/net/ipv6/netfilter/nf_conntrack_proto_icmpv6.c b/net/ipv6/netfilter/nf_conntrack_proto_icmpv6.c index 0fca7e8abeb7..ab154fb90018 100644 --- a/net/ipv6/netfilter/nf_conntrack_proto_icmpv6.c +++ b/net/ipv6/netfilter/nf_conntrack_proto_icmpv6.c | |||
@@ -276,7 +276,7 @@ static struct ctl_table icmpv6_sysctl_table[] = { | |||
276 | }; | 276 | }; |
277 | #endif /* CONFIG_SYSCTL */ | 277 | #endif /* CONFIG_SYSCTL */ |
278 | 278 | ||
279 | struct nf_conntrack_l4proto nf_conntrack_l4proto_icmpv6 = | 279 | struct nf_conntrack_l4proto nf_conntrack_l4proto_icmpv6 __read_mostly = |
280 | { | 280 | { |
281 | .l3proto = PF_INET6, | 281 | .l3proto = PF_INET6, |
282 | .l4proto = IPPROTO_ICMPV6, | 282 | .l4proto = IPPROTO_ICMPV6, |
@@ -297,5 +297,3 @@ struct nf_conntrack_l4proto nf_conntrack_l4proto_icmpv6 = | |||
297 | .ctl_table = icmpv6_sysctl_table, | 297 | .ctl_table = icmpv6_sysctl_table, |
298 | #endif | 298 | #endif |
299 | }; | 299 | }; |
300 | |||
301 | EXPORT_SYMBOL(nf_conntrack_l4proto_icmpv6); | ||
diff --git a/net/netfilter/nf_conntrack_l3proto_generic.c b/net/netfilter/nf_conntrack_l3proto_generic.c index 0691642b7724..991c52c9a28b 100644 --- a/net/netfilter/nf_conntrack_l3proto_generic.c +++ b/net/netfilter/nf_conntrack_l3proto_generic.c | |||
@@ -69,7 +69,7 @@ static int generic_get_l4proto(const struct sk_buff *skb, unsigned int nhoff, | |||
69 | } | 69 | } |
70 | 70 | ||
71 | 71 | ||
72 | struct nf_conntrack_l3proto nf_conntrack_l3proto_generic = { | 72 | struct nf_conntrack_l3proto nf_conntrack_l3proto_generic __read_mostly = { |
73 | .l3proto = PF_UNSPEC, | 73 | .l3proto = PF_UNSPEC, |
74 | .name = "unknown", | 74 | .name = "unknown", |
75 | .pkt_to_tuple = generic_pkt_to_tuple, | 75 | .pkt_to_tuple = generic_pkt_to_tuple, |
diff --git a/net/netfilter/nf_conntrack_proto_generic.c b/net/netfilter/nf_conntrack_proto_generic.c index 6faf1bed7224..d8b501878d9f 100644 --- a/net/netfilter/nf_conntrack_proto_generic.c +++ b/net/netfilter/nf_conntrack_proto_generic.c | |||
@@ -98,7 +98,7 @@ static struct ctl_table generic_compat_sysctl_table[] = { | |||
98 | #endif /* CONFIG_NF_CONNTRACK_PROC_COMPAT */ | 98 | #endif /* CONFIG_NF_CONNTRACK_PROC_COMPAT */ |
99 | #endif /* CONFIG_SYSCTL */ | 99 | #endif /* CONFIG_SYSCTL */ |
100 | 100 | ||
101 | struct nf_conntrack_l4proto nf_conntrack_l4proto_generic = | 101 | struct nf_conntrack_l4proto nf_conntrack_l4proto_generic __read_mostly = |
102 | { | 102 | { |
103 | .l3proto = PF_UNSPEC, | 103 | .l3proto = PF_UNSPEC, |
104 | .l4proto = 0, | 104 | .l4proto = 0, |
diff --git a/net/netfilter/nf_conntrack_proto_gre.c b/net/netfilter/nf_conntrack_proto_gre.c index 771c4c29936e..bdbead8a7a83 100644 --- a/net/netfilter/nf_conntrack_proto_gre.c +++ b/net/netfilter/nf_conntrack_proto_gre.c | |||
@@ -261,7 +261,7 @@ static void gre_destroy(struct nf_conn *ct) | |||
261 | } | 261 | } |
262 | 262 | ||
263 | /* protocol helper struct */ | 263 | /* protocol helper struct */ |
264 | static struct nf_conntrack_l4proto nf_conntrack_l4proto_gre4 = { | 264 | static struct nf_conntrack_l4proto nf_conntrack_l4proto_gre4 __read_mostly = { |
265 | .l3proto = AF_INET, | 265 | .l3proto = AF_INET, |
266 | .l4proto = IPPROTO_GRE, | 266 | .l4proto = IPPROTO_GRE, |
267 | .name = "gre", | 267 | .name = "gre", |
diff --git a/net/netfilter/nf_conntrack_proto_sctp.c b/net/netfilter/nf_conntrack_proto_sctp.c index debfe61378a1..04192acc7c40 100644 --- a/net/netfilter/nf_conntrack_proto_sctp.c +++ b/net/netfilter/nf_conntrack_proto_sctp.c | |||
@@ -601,7 +601,7 @@ static struct ctl_table sctp_compat_sysctl_table[] = { | |||
601 | #endif /* CONFIG_NF_CONNTRACK_PROC_COMPAT */ | 601 | #endif /* CONFIG_NF_CONNTRACK_PROC_COMPAT */ |
602 | #endif | 602 | #endif |
603 | 603 | ||
604 | struct nf_conntrack_l4proto nf_conntrack_l4proto_sctp4 = { | 604 | static struct nf_conntrack_l4proto nf_conntrack_l4proto_sctp4 __read_mostly = { |
605 | .l3proto = PF_INET, | 605 | .l3proto = PF_INET, |
606 | .l4proto = IPPROTO_SCTP, | 606 | .l4proto = IPPROTO_SCTP, |
607 | .name = "sctp", | 607 | .name = "sctp", |
@@ -622,7 +622,7 @@ struct nf_conntrack_l4proto nf_conntrack_l4proto_sctp4 = { | |||
622 | #endif | 622 | #endif |
623 | }; | 623 | }; |
624 | 624 | ||
625 | struct nf_conntrack_l4proto nf_conntrack_l4proto_sctp6 = { | 625 | static struct nf_conntrack_l4proto nf_conntrack_l4proto_sctp6 __read_mostly = { |
626 | .l3proto = PF_INET6, | 626 | .l3proto = PF_INET6, |
627 | .l4proto = IPPROTO_SCTP, | 627 | .l4proto = IPPROTO_SCTP, |
628 | .name = "sctp", | 628 | .name = "sctp", |
diff --git a/net/netfilter/nf_conntrack_proto_tcp.c b/net/netfilter/nf_conntrack_proto_tcp.c index 1c8206e6560a..87ad3ccf8aff 100644 --- a/net/netfilter/nf_conntrack_proto_tcp.c +++ b/net/netfilter/nf_conntrack_proto_tcp.c | |||
@@ -1372,7 +1372,7 @@ static struct ctl_table tcp_compat_sysctl_table[] = { | |||
1372 | #endif /* CONFIG_NF_CONNTRACK_PROC_COMPAT */ | 1372 | #endif /* CONFIG_NF_CONNTRACK_PROC_COMPAT */ |
1373 | #endif /* CONFIG_SYSCTL */ | 1373 | #endif /* CONFIG_SYSCTL */ |
1374 | 1374 | ||
1375 | struct nf_conntrack_l4proto nf_conntrack_l4proto_tcp4 = | 1375 | struct nf_conntrack_l4proto nf_conntrack_l4proto_tcp4 __read_mostly = |
1376 | { | 1376 | { |
1377 | .l3proto = PF_INET, | 1377 | .l3proto = PF_INET, |
1378 | .l4proto = IPPROTO_TCP, | 1378 | .l4proto = IPPROTO_TCP, |
@@ -1401,7 +1401,7 @@ struct nf_conntrack_l4proto nf_conntrack_l4proto_tcp4 = | |||
1401 | }; | 1401 | }; |
1402 | EXPORT_SYMBOL_GPL(nf_conntrack_l4proto_tcp4); | 1402 | EXPORT_SYMBOL_GPL(nf_conntrack_l4proto_tcp4); |
1403 | 1403 | ||
1404 | struct nf_conntrack_l4proto nf_conntrack_l4proto_tcp6 = | 1404 | struct nf_conntrack_l4proto nf_conntrack_l4proto_tcp6 __read_mostly = |
1405 | { | 1405 | { |
1406 | .l3proto = PF_INET6, | 1406 | .l3proto = PF_INET6, |
1407 | .l4proto = IPPROTO_TCP, | 1407 | .l4proto = IPPROTO_TCP, |
diff --git a/net/netfilter/nf_conntrack_proto_udp.c b/net/netfilter/nf_conntrack_proto_udp.c index 3620ecc095fd..13d94a025723 100644 --- a/net/netfilter/nf_conntrack_proto_udp.c +++ b/net/netfilter/nf_conntrack_proto_udp.c | |||
@@ -191,7 +191,7 @@ static struct ctl_table udp_compat_sysctl_table[] = { | |||
191 | #endif /* CONFIG_NF_CONNTRACK_PROC_COMPAT */ | 191 | #endif /* CONFIG_NF_CONNTRACK_PROC_COMPAT */ |
192 | #endif /* CONFIG_SYSCTL */ | 192 | #endif /* CONFIG_SYSCTL */ |
193 | 193 | ||
194 | struct nf_conntrack_l4proto nf_conntrack_l4proto_udp4 = | 194 | struct nf_conntrack_l4proto nf_conntrack_l4proto_udp4 __read_mostly = |
195 | { | 195 | { |
196 | .l3proto = PF_INET, | 196 | .l3proto = PF_INET, |
197 | .l4proto = IPPROTO_UDP, | 197 | .l4proto = IPPROTO_UDP, |
@@ -218,7 +218,7 @@ struct nf_conntrack_l4proto nf_conntrack_l4proto_udp4 = | |||
218 | }; | 218 | }; |
219 | EXPORT_SYMBOL_GPL(nf_conntrack_l4proto_udp4); | 219 | EXPORT_SYMBOL_GPL(nf_conntrack_l4proto_udp4); |
220 | 220 | ||
221 | struct nf_conntrack_l4proto nf_conntrack_l4proto_udp6 = | 221 | struct nf_conntrack_l4proto nf_conntrack_l4proto_udp6 __read_mostly = |
222 | { | 222 | { |
223 | .l3proto = PF_INET6, | 223 | .l3proto = PF_INET6, |
224 | .l4proto = IPPROTO_UDP, | 224 | .l4proto = IPPROTO_UDP, |