aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2007-07-08 01:22:02 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-07-11 01:17:15 -0400
commit9f15c5302de4e8b0aac7ca24c36bf26a7fe1a513 (patch)
treef9bf5883558941b1ad519f02106f53eefc90ba38 /net/ipv4
parentba9dda3ab5a865542e69dfe01edb2436857c9420 (diff)
[NETFILTER]: x_tables: mark matches and targets __read_mostly
Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4')
-rw-r--r--net/ipv4/netfilter/arp_tables.c4
-rw-r--r--net/ipv4/netfilter/arpt_mangle.c2
-rw-r--r--net/ipv4/netfilter/ip_tables.c6
-rw-r--r--net/ipv4/netfilter/ipt_CLUSTERIP.c2
-rw-r--r--net/ipv4/netfilter/ipt_ECN.c2
-rw-r--r--net/ipv4/netfilter/ipt_LOG.c2
-rw-r--r--net/ipv4/netfilter/ipt_MASQUERADE.c2
-rw-r--r--net/ipv4/netfilter/ipt_NETMAP.c2
-rw-r--r--net/ipv4/netfilter/ipt_REDIRECT.c2
-rw-r--r--net/ipv4/netfilter/ipt_REJECT.c2
-rw-r--r--net/ipv4/netfilter/ipt_SAME.c2
-rw-r--r--net/ipv4/netfilter/ipt_TOS.c2
-rw-r--r--net/ipv4/netfilter/ipt_TTL.c2
-rw-r--r--net/ipv4/netfilter/ipt_ULOG.c2
-rw-r--r--net/ipv4/netfilter/ipt_addrtype.c2
-rw-r--r--net/ipv4/netfilter/ipt_ah.c2
-rw-r--r--net/ipv4/netfilter/ipt_ecn.c2
-rw-r--r--net/ipv4/netfilter/ipt_iprange.c2
-rw-r--r--net/ipv4/netfilter/ipt_owner.c2
-rw-r--r--net/ipv4/netfilter/ipt_recent.c2
-rw-r--r--net/ipv4/netfilter/ipt_tos.c2
-rw-r--r--net/ipv4/netfilter/ipt_ttl.c2
-rw-r--r--net/ipv4/netfilter/nf_nat_rule.c4
23 files changed, 27 insertions, 27 deletions
diff --git a/net/ipv4/netfilter/arp_tables.c b/net/ipv4/netfilter/arp_tables.c
index 1d75a5cd7b44..e981232942a1 100644
--- a/net/ipv4/netfilter/arp_tables.c
+++ b/net/ipv4/netfilter/arp_tables.c
@@ -1140,13 +1140,13 @@ void arpt_unregister_table(struct arpt_table *table)
1140} 1140}
1141 1141
1142/* The built-in targets: standard (NULL) and error. */ 1142/* The built-in targets: standard (NULL) and error. */
1143static struct arpt_target arpt_standard_target = { 1143static struct arpt_target arpt_standard_target __read_mostly = {
1144 .name = ARPT_STANDARD_TARGET, 1144 .name = ARPT_STANDARD_TARGET,
1145 .targetsize = sizeof(int), 1145 .targetsize = sizeof(int),
1146 .family = NF_ARP, 1146 .family = NF_ARP,
1147}; 1147};
1148 1148
1149static struct arpt_target arpt_error_target = { 1149static struct arpt_target arpt_error_target __read_mostly = {
1150 .name = ARPT_ERROR_TARGET, 1150 .name = ARPT_ERROR_TARGET,
1151 .target = arpt_error, 1151 .target = arpt_error,
1152 .targetsize = ARPT_FUNCTION_MAXNAMELEN, 1152 .targetsize = ARPT_FUNCTION_MAXNAMELEN,
diff --git a/net/ipv4/netfilter/arpt_mangle.c b/net/ipv4/netfilter/arpt_mangle.c
index 497a16e0b064..c4bdab47597f 100644
--- a/net/ipv4/netfilter/arpt_mangle.c
+++ b/net/ipv4/netfilter/arpt_mangle.c
@@ -81,7 +81,7 @@ checkentry(const char *tablename, const void *e, const struct xt_target *target,
81 return true; 81 return true;
82} 82}
83 83
84static struct arpt_target arpt_mangle_reg = { 84static struct arpt_target arpt_mangle_reg __read_mostly = {
85 .name = "mangle", 85 .name = "mangle",
86 .target = target, 86 .target = target,
87 .targetsize = sizeof(struct arpt_mangle), 87 .targetsize = sizeof(struct arpt_mangle),
diff --git a/net/ipv4/netfilter/ip_tables.c b/net/ipv4/netfilter/ip_tables.c
index 650ab52e9157..2ba5bd9c8c1b 100644
--- a/net/ipv4/netfilter/ip_tables.c
+++ b/net/ipv4/netfilter/ip_tables.c
@@ -2264,7 +2264,7 @@ icmp_checkentry(const char *tablename,
2264} 2264}
2265 2265
2266/* The built-in targets: standard (NULL) and error. */ 2266/* The built-in targets: standard (NULL) and error. */
2267static struct xt_target ipt_standard_target = { 2267static struct xt_target ipt_standard_target __read_mostly = {
2268 .name = IPT_STANDARD_TARGET, 2268 .name = IPT_STANDARD_TARGET,
2269 .targetsize = sizeof(int), 2269 .targetsize = sizeof(int),
2270 .family = AF_INET, 2270 .family = AF_INET,
@@ -2275,7 +2275,7 @@ static struct xt_target ipt_standard_target = {
2275#endif 2275#endif
2276}; 2276};
2277 2277
2278static struct xt_target ipt_error_target = { 2278static struct xt_target ipt_error_target __read_mostly = {
2279 .name = IPT_ERROR_TARGET, 2279 .name = IPT_ERROR_TARGET,
2280 .target = ipt_error, 2280 .target = ipt_error,
2281 .targetsize = IPT_FUNCTION_MAXNAMELEN, 2281 .targetsize = IPT_FUNCTION_MAXNAMELEN,
@@ -2298,7 +2298,7 @@ static struct nf_sockopt_ops ipt_sockopts = {
2298#endif 2298#endif
2299}; 2299};
2300 2300
2301static struct xt_match icmp_matchstruct = { 2301static struct xt_match icmp_matchstruct __read_mostly = {
2302 .name = "icmp", 2302 .name = "icmp",
2303 .match = icmp_match, 2303 .match = icmp_match,
2304 .matchsize = sizeof(struct ipt_icmp), 2304 .matchsize = sizeof(struct ipt_icmp),
diff --git a/net/ipv4/netfilter/ipt_CLUSTERIP.c b/net/ipv4/netfilter/ipt_CLUSTERIP.c
index 5de13b44b1ca..1cef3b09c326 100644
--- a/net/ipv4/netfilter/ipt_CLUSTERIP.c
+++ b/net/ipv4/netfilter/ipt_CLUSTERIP.c
@@ -466,7 +466,7 @@ static void destroy(const struct xt_target *target, void *targinfo)
466 nf_ct_l3proto_module_put(target->family); 466 nf_ct_l3proto_module_put(target->family);
467} 467}
468 468
469static struct xt_target clusterip_tgt = { 469static struct xt_target clusterip_tgt __read_mostly = {
470 .name = "CLUSTERIP", 470 .name = "CLUSTERIP",
471 .family = AF_INET, 471 .family = AF_INET,
472 .target = target, 472 .target = target,
diff --git a/net/ipv4/netfilter/ipt_ECN.c b/net/ipv4/netfilter/ipt_ECN.c
index a647c1db86dd..f1253bd3837f 100644
--- a/net/ipv4/netfilter/ipt_ECN.c
+++ b/net/ipv4/netfilter/ipt_ECN.c
@@ -128,7 +128,7 @@ checkentry(const char *tablename,
128 return true; 128 return true;
129} 129}
130 130
131static struct xt_target ipt_ecn_reg = { 131static struct xt_target ipt_ecn_reg __read_mostly = {
132 .name = "ECN", 132 .name = "ECN",
133 .family = AF_INET, 133 .family = AF_INET,
134 .target = target, 134 .target = target,
diff --git a/net/ipv4/netfilter/ipt_LOG.c b/net/ipv4/netfilter/ipt_LOG.c
index bcc43a625e72..9bfce614ec28 100644
--- a/net/ipv4/netfilter/ipt_LOG.c
+++ b/net/ipv4/netfilter/ipt_LOG.c
@@ -463,7 +463,7 @@ static bool ipt_log_checkentry(const char *tablename,
463 return true; 463 return true;
464} 464}
465 465
466static struct xt_target ipt_log_reg = { 466static struct xt_target ipt_log_reg __read_mostly = {
467 .name = "LOG", 467 .name = "LOG",
468 .family = AF_INET, 468 .family = AF_INET,
469 .target = ipt_log_target, 469 .target = ipt_log_target,
diff --git a/net/ipv4/netfilter/ipt_MASQUERADE.c b/net/ipv4/netfilter/ipt_MASQUERADE.c
index f136ef7f23f8..bc033e0f424d 100644
--- a/net/ipv4/netfilter/ipt_MASQUERADE.c
+++ b/net/ipv4/netfilter/ipt_MASQUERADE.c
@@ -169,7 +169,7 @@ static struct notifier_block masq_inet_notifier = {
169 .notifier_call = masq_inet_event, 169 .notifier_call = masq_inet_event,
170}; 170};
171 171
172static struct xt_target masquerade = { 172static struct xt_target masquerade __read_mostly = {
173 .name = "MASQUERADE", 173 .name = "MASQUERADE",
174 .family = AF_INET, 174 .family = AF_INET,
175 .target = masquerade_target, 175 .target = masquerade_target,
diff --git a/net/ipv4/netfilter/ipt_NETMAP.c b/net/ipv4/netfilter/ipt_NETMAP.c
index a902c71218bf..0a7ce15bbdd0 100644
--- a/net/ipv4/netfilter/ipt_NETMAP.c
+++ b/net/ipv4/netfilter/ipt_NETMAP.c
@@ -85,7 +85,7 @@ target(struct sk_buff **pskb,
85 return nf_nat_setup_info(ct, &newrange, hooknum); 85 return nf_nat_setup_info(ct, &newrange, hooknum);
86} 86}
87 87
88static struct xt_target target_module = { 88static struct xt_target target_module __read_mostly = {
89 .name = MODULENAME, 89 .name = MODULENAME,
90 .family = AF_INET, 90 .family = AF_INET,
91 .target = target, 91 .target = target,
diff --git a/net/ipv4/netfilter/ipt_REDIRECT.c b/net/ipv4/netfilter/ipt_REDIRECT.c
index 2a04103b50d1..61e1e4772e37 100644
--- a/net/ipv4/netfilter/ipt_REDIRECT.c
+++ b/net/ipv4/netfilter/ipt_REDIRECT.c
@@ -101,7 +101,7 @@ redirect_target(struct sk_buff **pskb,
101 return nf_nat_setup_info(ct, &newrange, hooknum); 101 return nf_nat_setup_info(ct, &newrange, hooknum);
102} 102}
103 103
104static struct xt_target redirect_reg = { 104static struct xt_target redirect_reg __read_mostly = {
105 .name = "REDIRECT", 105 .name = "REDIRECT",
106 .family = AF_INET, 106 .family = AF_INET,
107 .target = redirect_target, 107 .target = redirect_target,
diff --git a/net/ipv4/netfilter/ipt_REJECT.c b/net/ipv4/netfilter/ipt_REJECT.c
index 90f7b7093785..dd5432c3f365 100644
--- a/net/ipv4/netfilter/ipt_REJECT.c
+++ b/net/ipv4/netfilter/ipt_REJECT.c
@@ -240,7 +240,7 @@ static bool check(const char *tablename,
240 return true; 240 return true;
241} 241}
242 242
243static struct xt_target ipt_reject_reg = { 243static struct xt_target ipt_reject_reg __read_mostly = {
244 .name = "REJECT", 244 .name = "REJECT",
245 .family = AF_INET, 245 .family = AF_INET,
246 .target = reject, 246 .target = reject,
diff --git a/net/ipv4/netfilter/ipt_SAME.c b/net/ipv4/netfilter/ipt_SAME.c
index 3649fabc04ea..3a0d7dac0af8 100644
--- a/net/ipv4/netfilter/ipt_SAME.c
+++ b/net/ipv4/netfilter/ipt_SAME.c
@@ -161,7 +161,7 @@ same_target(struct sk_buff **pskb,
161 return nf_nat_setup_info(ct, &newrange, hooknum); 161 return nf_nat_setup_info(ct, &newrange, hooknum);
162} 162}
163 163
164static struct xt_target same_reg = { 164static struct xt_target same_reg __read_mostly = {
165 .name = "SAME", 165 .name = "SAME",
166 .family = AF_INET, 166 .family = AF_INET,
167 .target = same_target, 167 .target = same_target,
diff --git a/net/ipv4/netfilter/ipt_TOS.c b/net/ipv4/netfilter/ipt_TOS.c
index ac43e86afbcf..25f5d0b39065 100644
--- a/net/ipv4/netfilter/ipt_TOS.c
+++ b/net/ipv4/netfilter/ipt_TOS.c
@@ -63,7 +63,7 @@ checkentry(const char *tablename,
63 return true; 63 return true;
64} 64}
65 65
66static struct xt_target ipt_tos_reg = { 66static struct xt_target ipt_tos_reg __read_mostly = {
67 .name = "TOS", 67 .name = "TOS",
68 .family = AF_INET, 68 .family = AF_INET,
69 .target = target, 69 .target = target,
diff --git a/net/ipv4/netfilter/ipt_TTL.c b/net/ipv4/netfilter/ipt_TTL.c
index 737830b68ade..2b54e7b0cfe8 100644
--- a/net/ipv4/netfilter/ipt_TTL.c
+++ b/net/ipv4/netfilter/ipt_TTL.c
@@ -80,7 +80,7 @@ static bool ipt_ttl_checkentry(const char *tablename,
80 return true; 80 return true;
81} 81}
82 82
83static struct xt_target ipt_TTL = { 83static struct xt_target ipt_TTL __read_mostly = {
84 .name = "TTL", 84 .name = "TTL",
85 .family = AF_INET, 85 .family = AF_INET,
86 .target = ipt_ttl_target, 86 .target = ipt_ttl_target,
diff --git a/net/ipv4/netfilter/ipt_ULOG.c b/net/ipv4/netfilter/ipt_ULOG.c
index 5b25ca688784..226750d1f89b 100644
--- a/net/ipv4/netfilter/ipt_ULOG.c
+++ b/net/ipv4/netfilter/ipt_ULOG.c
@@ -381,7 +381,7 @@ static int compat_to_user(void __user *dst, void *src)
381} 381}
382#endif /* CONFIG_COMPAT */ 382#endif /* CONFIG_COMPAT */
383 383
384static struct xt_target ipt_ulog_reg = { 384static struct xt_target ipt_ulog_reg __read_mostly = {
385 .name = "ULOG", 385 .name = "ULOG",
386 .family = AF_INET, 386 .family = AF_INET,
387 .target = ipt_ulog_target, 387 .target = ipt_ulog_target,
diff --git a/net/ipv4/netfilter/ipt_addrtype.c b/net/ipv4/netfilter/ipt_addrtype.c
index abea446a4437..59f01f7ba6b4 100644
--- a/net/ipv4/netfilter/ipt_addrtype.c
+++ b/net/ipv4/netfilter/ipt_addrtype.c
@@ -44,7 +44,7 @@ static bool match(const struct sk_buff *skb,
44 return ret; 44 return ret;
45} 45}
46 46
47static struct xt_match addrtype_match = { 47static struct xt_match addrtype_match __read_mostly = {
48 .name = "addrtype", 48 .name = "addrtype",
49 .family = AF_INET, 49 .family = AF_INET,
50 .match = match, 50 .match = match,
diff --git a/net/ipv4/netfilter/ipt_ah.c b/net/ipv4/netfilter/ipt_ah.c
index 49d503cbab09..61b017fd743c 100644
--- a/net/ipv4/netfilter/ipt_ah.c
+++ b/net/ipv4/netfilter/ipt_ah.c
@@ -88,7 +88,7 @@ checkentry(const char *tablename,
88 return true; 88 return true;
89} 89}
90 90
91static struct xt_match ah_match = { 91static struct xt_match ah_match __read_mostly = {
92 .name = "ah", 92 .name = "ah",
93 .family = AF_INET, 93 .family = AF_INET,
94 .match = match, 94 .match = match,
diff --git a/net/ipv4/netfilter/ipt_ecn.c b/net/ipv4/netfilter/ipt_ecn.c
index 3129e3106162..d6925c674069 100644
--- a/net/ipv4/netfilter/ipt_ecn.c
+++ b/net/ipv4/netfilter/ipt_ecn.c
@@ -111,7 +111,7 @@ static bool checkentry(const char *tablename, const void *ip_void,
111 return true; 111 return true;
112} 112}
113 113
114static struct xt_match ecn_match = { 114static struct xt_match ecn_match __read_mostly = {
115 .name = "ecn", 115 .name = "ecn",
116 .family = AF_INET, 116 .family = AF_INET,
117 .match = match, 117 .match = match,
diff --git a/net/ipv4/netfilter/ipt_iprange.c b/net/ipv4/netfilter/ipt_iprange.c
index 854281c62008..6a3a033a6808 100644
--- a/net/ipv4/netfilter/ipt_iprange.c
+++ b/net/ipv4/netfilter/ipt_iprange.c
@@ -63,7 +63,7 @@ match(const struct sk_buff *skb,
63 return true; 63 return true;
64} 64}
65 65
66static struct xt_match iprange_match = { 66static struct xt_match iprange_match __read_mostly = {
67 .name = "iprange", 67 .name = "iprange",
68 .family = AF_INET, 68 .family = AF_INET,
69 .match = match, 69 .match = match,
diff --git a/net/ipv4/netfilter/ipt_owner.c b/net/ipv4/netfilter/ipt_owner.c
index deea4b8cc055..b14e77da7a33 100644
--- a/net/ipv4/netfilter/ipt_owner.c
+++ b/net/ipv4/netfilter/ipt_owner.c
@@ -68,7 +68,7 @@ checkentry(const char *tablename,
68 return true; 68 return true;
69} 69}
70 70
71static struct xt_match owner_match = { 71static struct xt_match owner_match __read_mostly = {
72 .name = "owner", 72 .name = "owner",
73 .family = AF_INET, 73 .family = AF_INET,
74 .match = match, 74 .match = match,
diff --git a/net/ipv4/netfilter/ipt_recent.c b/net/ipv4/netfilter/ipt_recent.c
index 68f7181e412d..a7b14f2ae2dc 100644
--- a/net/ipv4/netfilter/ipt_recent.c
+++ b/net/ipv4/netfilter/ipt_recent.c
@@ -460,7 +460,7 @@ static const struct file_operations recent_fops = {
460}; 460};
461#endif /* CONFIG_PROC_FS */ 461#endif /* CONFIG_PROC_FS */
462 462
463static struct xt_match recent_match = { 463static struct xt_match recent_match __read_mostly = {
464 .name = "recent", 464 .name = "recent",
465 .family = AF_INET, 465 .family = AF_INET,
466 .match = ipt_recent_match, 466 .match = ipt_recent_match,
diff --git a/net/ipv4/netfilter/ipt_tos.c b/net/ipv4/netfilter/ipt_tos.c
index 67699ae46d37..e740441c973d 100644
--- a/net/ipv4/netfilter/ipt_tos.c
+++ b/net/ipv4/netfilter/ipt_tos.c
@@ -33,7 +33,7 @@ match(const struct sk_buff *skb,
33 return (ip_hdr(skb)->tos == info->tos) ^ info->invert; 33 return (ip_hdr(skb)->tos == info->tos) ^ info->invert;
34} 34}
35 35
36static struct xt_match tos_match = { 36static struct xt_match tos_match __read_mostly = {
37 .name = "tos", 37 .name = "tos",
38 .family = AF_INET, 38 .family = AF_INET,
39 .match = match, 39 .match = match,
diff --git a/net/ipv4/netfilter/ipt_ttl.c b/net/ipv4/netfilter/ipt_ttl.c
index 59a644db4d74..a439900a4ba5 100644
--- a/net/ipv4/netfilter/ipt_ttl.c
+++ b/net/ipv4/netfilter/ipt_ttl.c
@@ -44,7 +44,7 @@ static bool match(const struct sk_buff *skb,
44 return false; 44 return false;
45} 45}
46 46
47static struct xt_match ttl_match = { 47static struct xt_match ttl_match __read_mostly = {
48 .name = "ttl", 48 .name = "ttl",
49 .family = AF_INET, 49 .family = AF_INET,
50 .match = match, 50 .match = match,
diff --git a/net/ipv4/netfilter/nf_nat_rule.c b/net/ipv4/netfilter/nf_nat_rule.c
index ea1a07c74fe3..080393a143d7 100644
--- a/net/ipv4/netfilter/nf_nat_rule.c
+++ b/net/ipv4/netfilter/nf_nat_rule.c
@@ -228,7 +228,7 @@ int nf_nat_rule_find(struct sk_buff **pskb,
228 return ret; 228 return ret;
229} 229}
230 230
231static struct xt_target ipt_snat_reg = { 231static struct xt_target ipt_snat_reg __read_mostly = {
232 .name = "SNAT", 232 .name = "SNAT",
233 .target = ipt_snat_target, 233 .target = ipt_snat_target,
234 .targetsize = sizeof(struct nf_nat_multi_range_compat), 234 .targetsize = sizeof(struct nf_nat_multi_range_compat),
@@ -238,7 +238,7 @@ static struct xt_target ipt_snat_reg = {
238 .family = AF_INET, 238 .family = AF_INET,
239}; 239};
240 240
241static struct xt_target ipt_dnat_reg = { 241static struct xt_target ipt_dnat_reg __read_mostly = {
242 .name = "DNAT", 242 .name = "DNAT",
243 .target = ipt_dnat_target, 243 .target = ipt_dnat_target,
244 .targetsize = sizeof(struct nf_nat_multi_range_compat), 244 .targetsize = sizeof(struct nf_nat_multi_range_compat),