Commit 9f15c530 authored by Patrick McHardy's avatar Patrick McHardy Committed by David S. Miller

[NETFILTER]: x_tables: mark matches and targets __read_mostly

Signed-off-by: default avatarPatrick McHardy <kaber@trash.net>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent ba9dda3a
...@@ -1140,13 +1140,13 @@ void arpt_unregister_table(struct arpt_table *table) ...@@ -1140,13 +1140,13 @@ void arpt_unregister_table(struct arpt_table *table)
} }
/* The built-in targets: standard (NULL) and error. */ /* The built-in targets: standard (NULL) and error. */
static struct arpt_target arpt_standard_target = { static struct arpt_target arpt_standard_target __read_mostly = {
.name = ARPT_STANDARD_TARGET, .name = ARPT_STANDARD_TARGET,
.targetsize = sizeof(int), .targetsize = sizeof(int),
.family = NF_ARP, .family = NF_ARP,
}; };
static struct arpt_target arpt_error_target = { static struct arpt_target arpt_error_target __read_mostly = {
.name = ARPT_ERROR_TARGET, .name = ARPT_ERROR_TARGET,
.target = arpt_error, .target = arpt_error,
.targetsize = ARPT_FUNCTION_MAXNAMELEN, .targetsize = ARPT_FUNCTION_MAXNAMELEN,
......
...@@ -81,7 +81,7 @@ checkentry(const char *tablename, const void *e, const struct xt_target *target, ...@@ -81,7 +81,7 @@ checkentry(const char *tablename, const void *e, const struct xt_target *target,
return true; return true;
} }
static struct arpt_target arpt_mangle_reg = { static struct arpt_target arpt_mangle_reg __read_mostly = {
.name = "mangle", .name = "mangle",
.target = target, .target = target,
.targetsize = sizeof(struct arpt_mangle), .targetsize = sizeof(struct arpt_mangle),
......
...@@ -2264,7 +2264,7 @@ icmp_checkentry(const char *tablename, ...@@ -2264,7 +2264,7 @@ icmp_checkentry(const char *tablename,
} }
/* The built-in targets: standard (NULL) and error. */ /* The built-in targets: standard (NULL) and error. */
static struct xt_target ipt_standard_target = { static struct xt_target ipt_standard_target __read_mostly = {
.name = IPT_STANDARD_TARGET, .name = IPT_STANDARD_TARGET,
.targetsize = sizeof(int), .targetsize = sizeof(int),
.family = AF_INET, .family = AF_INET,
...@@ -2275,7 +2275,7 @@ static struct xt_target ipt_standard_target = { ...@@ -2275,7 +2275,7 @@ static struct xt_target ipt_standard_target = {
#endif #endif
}; };
static struct xt_target ipt_error_target = { static struct xt_target ipt_error_target __read_mostly = {
.name = IPT_ERROR_TARGET, .name = IPT_ERROR_TARGET,
.target = ipt_error, .target = ipt_error,
.targetsize = IPT_FUNCTION_MAXNAMELEN, .targetsize = IPT_FUNCTION_MAXNAMELEN,
...@@ -2298,7 +2298,7 @@ static struct nf_sockopt_ops ipt_sockopts = { ...@@ -2298,7 +2298,7 @@ static struct nf_sockopt_ops ipt_sockopts = {
#endif #endif
}; };
static struct xt_match icmp_matchstruct = { static struct xt_match icmp_matchstruct __read_mostly = {
.name = "icmp", .name = "icmp",
.match = icmp_match, .match = icmp_match,
.matchsize = sizeof(struct ipt_icmp), .matchsize = sizeof(struct ipt_icmp),
......
...@@ -466,7 +466,7 @@ static void destroy(const struct xt_target *target, void *targinfo) ...@@ -466,7 +466,7 @@ static void destroy(const struct xt_target *target, void *targinfo)
nf_ct_l3proto_module_put(target->family); nf_ct_l3proto_module_put(target->family);
} }
static struct xt_target clusterip_tgt = { static struct xt_target clusterip_tgt __read_mostly = {
.name = "CLUSTERIP", .name = "CLUSTERIP",
.family = AF_INET, .family = AF_INET,
.target = target, .target = target,
......
...@@ -128,7 +128,7 @@ checkentry(const char *tablename, ...@@ -128,7 +128,7 @@ checkentry(const char *tablename,
return true; return true;
} }
static struct xt_target ipt_ecn_reg = { static struct xt_target ipt_ecn_reg __read_mostly = {
.name = "ECN", .name = "ECN",
.family = AF_INET, .family = AF_INET,
.target = target, .target = target,
......
...@@ -463,7 +463,7 @@ static bool ipt_log_checkentry(const char *tablename, ...@@ -463,7 +463,7 @@ static bool ipt_log_checkentry(const char *tablename,
return true; return true;
} }
static struct xt_target ipt_log_reg = { static struct xt_target ipt_log_reg __read_mostly = {
.name = "LOG", .name = "LOG",
.family = AF_INET, .family = AF_INET,
.target = ipt_log_target, .target = ipt_log_target,
......
...@@ -169,7 +169,7 @@ static struct notifier_block masq_inet_notifier = { ...@@ -169,7 +169,7 @@ static struct notifier_block masq_inet_notifier = {
.notifier_call = masq_inet_event, .notifier_call = masq_inet_event,
}; };
static struct xt_target masquerade = { static struct xt_target masquerade __read_mostly = {
.name = "MASQUERADE", .name = "MASQUERADE",
.family = AF_INET, .family = AF_INET,
.target = masquerade_target, .target = masquerade_target,
......
...@@ -85,7 +85,7 @@ target(struct sk_buff **pskb, ...@@ -85,7 +85,7 @@ target(struct sk_buff **pskb,
return nf_nat_setup_info(ct, &newrange, hooknum); return nf_nat_setup_info(ct, &newrange, hooknum);
} }
static struct xt_target target_module = { static struct xt_target target_module __read_mostly = {
.name = MODULENAME, .name = MODULENAME,
.family = AF_INET, .family = AF_INET,
.target = target, .target = target,
......
...@@ -101,7 +101,7 @@ redirect_target(struct sk_buff **pskb, ...@@ -101,7 +101,7 @@ redirect_target(struct sk_buff **pskb,
return nf_nat_setup_info(ct, &newrange, hooknum); return nf_nat_setup_info(ct, &newrange, hooknum);
} }
static struct xt_target redirect_reg = { static struct xt_target redirect_reg __read_mostly = {
.name = "REDIRECT", .name = "REDIRECT",
.family = AF_INET, .family = AF_INET,
.target = redirect_target, .target = redirect_target,
......
...@@ -240,7 +240,7 @@ static bool check(const char *tablename, ...@@ -240,7 +240,7 @@ static bool check(const char *tablename,
return true; return true;
} }
static struct xt_target ipt_reject_reg = { static struct xt_target ipt_reject_reg __read_mostly = {
.name = "REJECT", .name = "REJECT",
.family = AF_INET, .family = AF_INET,
.target = reject, .target = reject,
......
...@@ -161,7 +161,7 @@ same_target(struct sk_buff **pskb, ...@@ -161,7 +161,7 @@ same_target(struct sk_buff **pskb,
return nf_nat_setup_info(ct, &newrange, hooknum); return nf_nat_setup_info(ct, &newrange, hooknum);
} }
static struct xt_target same_reg = { static struct xt_target same_reg __read_mostly = {
.name = "SAME", .name = "SAME",
.family = AF_INET, .family = AF_INET,
.target = same_target, .target = same_target,
......
...@@ -63,7 +63,7 @@ checkentry(const char *tablename, ...@@ -63,7 +63,7 @@ checkentry(const char *tablename,
return true; return true;
} }
static struct xt_target ipt_tos_reg = { static struct xt_target ipt_tos_reg __read_mostly = {
.name = "TOS", .name = "TOS",
.family = AF_INET, .family = AF_INET,
.target = target, .target = target,
......
...@@ -80,7 +80,7 @@ static bool ipt_ttl_checkentry(const char *tablename, ...@@ -80,7 +80,7 @@ static bool ipt_ttl_checkentry(const char *tablename,
return true; return true;
} }
static struct xt_target ipt_TTL = { static struct xt_target ipt_TTL __read_mostly = {
.name = "TTL", .name = "TTL",
.family = AF_INET, .family = AF_INET,
.target = ipt_ttl_target, .target = ipt_ttl_target,
......
...@@ -381,7 +381,7 @@ static int compat_to_user(void __user *dst, void *src) ...@@ -381,7 +381,7 @@ static int compat_to_user(void __user *dst, void *src)
} }
#endif /* CONFIG_COMPAT */ #endif /* CONFIG_COMPAT */
static struct xt_target ipt_ulog_reg = { static struct xt_target ipt_ulog_reg __read_mostly = {
.name = "ULOG", .name = "ULOG",
.family = AF_INET, .family = AF_INET,
.target = ipt_ulog_target, .target = ipt_ulog_target,
......
...@@ -44,7 +44,7 @@ static bool match(const struct sk_buff *skb, ...@@ -44,7 +44,7 @@ static bool match(const struct sk_buff *skb,
return ret; return ret;
} }
static struct xt_match addrtype_match = { static struct xt_match addrtype_match __read_mostly = {
.name = "addrtype", .name = "addrtype",
.family = AF_INET, .family = AF_INET,
.match = match, .match = match,
......
...@@ -88,7 +88,7 @@ checkentry(const char *tablename, ...@@ -88,7 +88,7 @@ checkentry(const char *tablename,
return true; return true;
} }
static struct xt_match ah_match = { static struct xt_match ah_match __read_mostly = {
.name = "ah", .name = "ah",
.family = AF_INET, .family = AF_INET,
.match = match, .match = match,
......
...@@ -111,7 +111,7 @@ static bool checkentry(const char *tablename, const void *ip_void, ...@@ -111,7 +111,7 @@ static bool checkentry(const char *tablename, const void *ip_void,
return true; return true;
} }
static struct xt_match ecn_match = { static struct xt_match ecn_match __read_mostly = {
.name = "ecn", .name = "ecn",
.family = AF_INET, .family = AF_INET,
.match = match, .match = match,
......
...@@ -63,7 +63,7 @@ match(const struct sk_buff *skb, ...@@ -63,7 +63,7 @@ match(const struct sk_buff *skb,
return true; return true;
} }
static struct xt_match iprange_match = { static struct xt_match iprange_match __read_mostly = {
.name = "iprange", .name = "iprange",
.family = AF_INET, .family = AF_INET,
.match = match, .match = match,
......
...@@ -68,7 +68,7 @@ checkentry(const char *tablename, ...@@ -68,7 +68,7 @@ checkentry(const char *tablename,
return true; return true;
} }
static struct xt_match owner_match = { static struct xt_match owner_match __read_mostly = {
.name = "owner", .name = "owner",
.family = AF_INET, .family = AF_INET,
.match = match, .match = match,
......
...@@ -460,7 +460,7 @@ static const struct file_operations recent_fops = { ...@@ -460,7 +460,7 @@ static const struct file_operations recent_fops = {
}; };
#endif /* CONFIG_PROC_FS */ #endif /* CONFIG_PROC_FS */
static struct xt_match recent_match = { static struct xt_match recent_match __read_mostly = {
.name = "recent", .name = "recent",
.family = AF_INET, .family = AF_INET,
.match = ipt_recent_match, .match = ipt_recent_match,
......
...@@ -33,7 +33,7 @@ match(const struct sk_buff *skb, ...@@ -33,7 +33,7 @@ match(const struct sk_buff *skb,
return (ip_hdr(skb)->tos == info->tos) ^ info->invert; return (ip_hdr(skb)->tos == info->tos) ^ info->invert;
} }
static struct xt_match tos_match = { static struct xt_match tos_match __read_mostly = {
.name = "tos", .name = "tos",
.family = AF_INET, .family = AF_INET,
.match = match, .match = match,
......
...@@ -44,7 +44,7 @@ static bool match(const struct sk_buff *skb, ...@@ -44,7 +44,7 @@ static bool match(const struct sk_buff *skb,
return false; return false;
} }
static struct xt_match ttl_match = { static struct xt_match ttl_match __read_mostly = {
.name = "ttl", .name = "ttl",
.family = AF_INET, .family = AF_INET,
.match = match, .match = match,
......
...@@ -228,7 +228,7 @@ int nf_nat_rule_find(struct sk_buff **pskb, ...@@ -228,7 +228,7 @@ int nf_nat_rule_find(struct sk_buff **pskb,
return ret; return ret;
} }
static struct xt_target ipt_snat_reg = { static struct xt_target ipt_snat_reg __read_mostly = {
.name = "SNAT", .name = "SNAT",
.target = ipt_snat_target, .target = ipt_snat_target,
.targetsize = sizeof(struct nf_nat_multi_range_compat), .targetsize = sizeof(struct nf_nat_multi_range_compat),
...@@ -238,7 +238,7 @@ static struct xt_target ipt_snat_reg = { ...@@ -238,7 +238,7 @@ static struct xt_target ipt_snat_reg = {
.family = AF_INET, .family = AF_INET,
}; };
static struct xt_target ipt_dnat_reg = { static struct xt_target ipt_dnat_reg __read_mostly = {
.name = "DNAT", .name = "DNAT",
.target = ipt_dnat_target, .target = ipt_dnat_target,
.targetsize = sizeof(struct nf_nat_multi_range_compat), .targetsize = sizeof(struct nf_nat_multi_range_compat),
......
...@@ -1441,13 +1441,13 @@ icmp6_checkentry(const char *tablename, ...@@ -1441,13 +1441,13 @@ icmp6_checkentry(const char *tablename,
} }
/* The built-in targets: standard (NULL) and error. */ /* The built-in targets: standard (NULL) and error. */
static struct xt_target ip6t_standard_target = { static struct xt_target ip6t_standard_target __read_mostly = {
.name = IP6T_STANDARD_TARGET, .name = IP6T_STANDARD_TARGET,
.targetsize = sizeof(int), .targetsize = sizeof(int),
.family = AF_INET6, .family = AF_INET6,
}; };
static struct xt_target ip6t_error_target = { static struct xt_target ip6t_error_target __read_mostly = {
.name = IP6T_ERROR_TARGET, .name = IP6T_ERROR_TARGET,
.target = ip6t_error, .target = ip6t_error,
.targetsize = IP6T_FUNCTION_MAXNAMELEN, .targetsize = IP6T_FUNCTION_MAXNAMELEN,
...@@ -1464,7 +1464,7 @@ static struct nf_sockopt_ops ip6t_sockopts = { ...@@ -1464,7 +1464,7 @@ static struct nf_sockopt_ops ip6t_sockopts = {
.get = do_ip6t_get_ctl, .get = do_ip6t_get_ctl,
}; };
static struct xt_match icmp6_matchstruct = { static struct xt_match icmp6_matchstruct __read_mostly = {
.name = "icmp6", .name = "icmp6",
.match = &icmp6_match, .match = &icmp6_match,
.matchsize = sizeof(struct ip6t_icmp), .matchsize = sizeof(struct ip6t_icmp),
......
...@@ -79,7 +79,7 @@ static bool ip6t_hl_checkentry(const char *tablename, ...@@ -79,7 +79,7 @@ static bool ip6t_hl_checkentry(const char *tablename,
return true; return true;
} }
static struct xt_target ip6t_HL = { static struct xt_target ip6t_HL __read_mostly = {
.name = "HL", .name = "HL",
.family = AF_INET6, .family = AF_INET6,
.target = ip6t_hl_target, .target = ip6t_hl_target,
......
...@@ -477,7 +477,7 @@ static bool ip6t_log_checkentry(const char *tablename, ...@@ -477,7 +477,7 @@ static bool ip6t_log_checkentry(const char *tablename,
return true; return true;
} }
static struct xt_target ip6t_log_reg = { static struct xt_target ip6t_log_reg __read_mostly = {
.name = "LOG", .name = "LOG",
.family = AF_INET6, .family = AF_INET6,
.target = ip6t_log_target, .target = ip6t_log_target,
......
...@@ -244,7 +244,7 @@ static bool check(const char *tablename, ...@@ -244,7 +244,7 @@ static bool check(const char *tablename,
return true; return true;
} }
static struct xt_target ip6t_reject_reg = { static struct xt_target ip6t_reject_reg __read_mostly = {
.name = "REJECT", .name = "REJECT",
.family = AF_INET6, .family = AF_INET6,
.target = reject6_target, .target = reject6_target,
......
...@@ -120,7 +120,7 @@ checkentry(const char *tablename, ...@@ -120,7 +120,7 @@ checkentry(const char *tablename,
return true; return true;
} }
static struct xt_match ah_match = { static struct xt_match ah_match __read_mostly = {
.name = "ah", .name = "ah",
.family = AF_INET6, .family = AF_INET6,
.match = match, .match = match,
......
...@@ -62,7 +62,7 @@ match(const struct sk_buff *skb, ...@@ -62,7 +62,7 @@ match(const struct sk_buff *skb,
return false; return false;
} }
static struct xt_match eui64_match = { static struct xt_match eui64_match __read_mostly = {
.name = "eui64", .name = "eui64",
.family = AF_INET6, .family = AF_INET6,
.match = match, .match = match,
......
...@@ -137,7 +137,7 @@ checkentry(const char *tablename, ...@@ -137,7 +137,7 @@ checkentry(const char *tablename,
return true; return true;
} }
static struct xt_match frag_match = { static struct xt_match frag_match __read_mostly = {
.name = "frag", .name = "frag",
.family = AF_INET6, .family = AF_INET6,
.match = match, .match = match,
......
...@@ -193,7 +193,7 @@ checkentry(const char *tablename, ...@@ -193,7 +193,7 @@ checkentry(const char *tablename,
return true; return true;
} }
static struct xt_match opts_match[] = { static struct xt_match opts_match[] __read_mostly = {
{ {
.name = "hbh", .name = "hbh",
.family = AF_INET6, .family = AF_INET6,
......
...@@ -49,7 +49,7 @@ static bool match(const struct sk_buff *skb, ...@@ -49,7 +49,7 @@ static bool match(const struct sk_buff *skb,
return false; return false;
} }
static struct xt_match hl_match = { static struct xt_match hl_match __read_mostly = {
.name = "hl", .name = "hl",
.family = AF_INET6, .family = AF_INET6,
.match = match, .match = match,
......
...@@ -141,7 +141,7 @@ ipv6header_checkentry(const char *tablename, ...@@ -141,7 +141,7 @@ ipv6header_checkentry(const char *tablename,
return true; return true;
} }
static struct xt_match ip6t_ipv6header_match = { static struct xt_match ip6t_ipv6header_match __read_mostly = {
.name = "ipv6header", .name = "ipv6header",
.family = AF_INET6, .family = AF_INET6,
.match = &ipv6header_match, .match = &ipv6header_match,
......
...@@ -89,7 +89,7 @@ mh_checkentry(const char *tablename, ...@@ -89,7 +89,7 @@ mh_checkentry(const char *tablename,
return !(mhinfo->invflags & ~IP6T_MH_INV_MASK); return !(mhinfo->invflags & ~IP6T_MH_INV_MASK);
} }
static struct xt_match mh_match = { static struct xt_match mh_match __read_mostly = {
.name = "mh", .name = "mh",
.family = AF_INET6, .family = AF_INET6,
.checkentry = mh_checkentry, .checkentry = mh_checkentry,
......
...@@ -68,7 +68,7 @@ checkentry(const char *tablename, ...@@ -68,7 +68,7 @@ checkentry(const char *tablename,
return true; return true;
} }
static struct xt_match owner_match = { static struct xt_match owner_match __read_mostly = {
.name = "owner", .name = "owner",
.family = AF_INET6, .family = AF_INET6,
.match = match, .match = match,
......
...@@ -224,7 +224,7 @@ checkentry(const char *tablename, ...@@ -224,7 +224,7 @@ checkentry(const char *tablename,
return true; return true;
} }
static struct xt_match rt_match = { static struct xt_match rt_match __read_mostly = {
.name = "rt", .name = "rt",
.family = AF_INET6, .family = AF_INET6,
.match = match, .match = match,
......
...@@ -39,7 +39,7 @@ target(struct sk_buff **pskb, ...@@ -39,7 +39,7 @@ target(struct sk_buff **pskb,
return XT_CONTINUE; return XT_CONTINUE;
} }
static struct xt_target xt_classify_target[] = { static struct xt_target xt_classify_target[] __read_mostly = {
{ {
.family = AF_INET, .family = AF_INET,
.name = "CLASSIFY", .name = "CLASSIFY",
......
...@@ -142,7 +142,7 @@ static int compat_to_user(void __user *dst, void *src) ...@@ -142,7 +142,7 @@ static int compat_to_user(void __user *dst, void *src)
} }
#endif /* CONFIG_COMPAT */ #endif /* CONFIG_COMPAT */
static struct xt_target xt_connmark_target[] = { static struct xt_target xt_connmark_target[] __read_mostly = {
{ {
.name = "CONNMARK", .name = "CONNMARK",
.family = AF_INET, .family = AF_INET,
......
...@@ -115,7 +115,7 @@ destroy(const struct xt_target *target, void *targinfo) ...@@ -115,7 +115,7 @@ destroy(const struct xt_target *target, void *targinfo)
nf_ct_l3proto_module_put(target->family); nf_ct_l3proto_module_put(target->family);
} }
static struct xt_target xt_connsecmark_target[] = { static struct xt_target xt_connsecmark_target[] __read_mostly = {
{ {
.name = "CONNSECMARK", .name = "CONNSECMARK",
.family = AF_INET, .family = AF_INET,
......
...@@ -81,7 +81,7 @@ static bool checkentry(const char *tablename, ...@@ -81,7 +81,7 @@ static bool checkentry(const char *tablename,
return true; return true;
} }
static struct xt_target xt_dscp_target[] = { static struct xt_target xt_dscp_target[] __read_mostly = {
{ {
.name = "DSCP", .name = "DSCP",
.family = AF_INET, .family = AF_INET,
......
...@@ -133,7 +133,7 @@ static int compat_to_user_v1(void __user *dst, void *src) ...@@ -133,7 +133,7 @@ static int compat_to_user_v1(void __user *dst, void *src)
} }
#endif /* CONFIG_COMPAT */ #endif /* CONFIG_COMPAT */
static struct xt_target xt_mark_target[] = { static struct xt_target xt_mark_target[] __read_mostly = {
{ {
.name = "MARK", .name = "MARK",
.family = AF_INET, .family = AF_INET,
......
...@@ -52,7 +52,7 @@ nflog_checkentry(const char *tablename, const void *entry, ...@@ -52,7 +52,7 @@ nflog_checkentry(const char *tablename, const void *entry,
return true; return true;
} }
static struct xt_target xt_nflog_target[] = { static struct xt_target xt_nflog_target[] __read_mostly = {
{ {
.name = "NFLOG", .name = "NFLOG",
.family = AF_INET, .family = AF_INET,
......
...@@ -36,7 +36,7 @@ target(struct sk_buff **pskb, ...@@ -36,7 +36,7 @@ target(struct sk_buff **pskb,
return NF_QUEUE_NR(tinfo->queuenum); return NF_QUEUE_NR(tinfo->queuenum);
} }
static struct xt_target xt_nfqueue_target[] = { static struct xt_target xt_nfqueue_target[] __read_mostly = {
{ {
.name = "NFQUEUE", .name = "NFQUEUE",
.family = AF_INET, .family = AF_INET,
......
...@@ -33,7 +33,7 @@ target(struct sk_buff **pskb, ...@@ -33,7 +33,7 @@ target(struct sk_buff **pskb,
return XT_CONTINUE; return XT_CONTINUE;
} }
static struct xt_target xt_notrack_target[] = { static struct xt_target xt_notrack_target[] __read_mostly = {
{ {
.name = "NOTRACK", .name = "NOTRACK",
.family = AF_INET, .family = AF_INET,
......
...@@ -109,7 +109,7 @@ static bool checkentry(const char *tablename, const void *entry, ...@@ -109,7 +109,7 @@ static bool checkentry(const char *tablename, const void *entry,
return true; return true;
} }
static struct xt_target xt_secmark_target[] = { static struct xt_target xt_secmark_target[] __read_mostly = {
{ {
.name = "SECMARK", .name = "SECMARK",
.family = AF_INET, .family = AF_INET,
......
...@@ -259,7 +259,7 @@ xt_tcpmss_checkentry6(const char *tablename, ...@@ -259,7 +259,7 @@ xt_tcpmss_checkentry6(const char *tablename,
} }
#endif #endif
static struct xt_target xt_tcpmss_reg[] = { static struct xt_target xt_tcpmss_reg[] __read_mostly = {
{ {
.family = AF_INET, .family = AF_INET,
.name = "TCPMSS", .name = "TCPMSS",
......
...@@ -21,7 +21,7 @@ target(struct sk_buff **pskb, ...@@ -21,7 +21,7 @@ target(struct sk_buff **pskb,
return XT_CONTINUE; return XT_CONTINUE;
} }
static struct xt_target xt_trace_target[] = { static struct xt_target xt_trace_target[] __read_mostly = {
{ {
.name = "TRACE", .name = "TRACE",
.family = AF_INET, .family = AF_INET,
......
...@@ -29,7 +29,7 @@ match(const struct sk_buff *skb, ...@@ -29,7 +29,7 @@ match(const struct sk_buff *skb,
return true; return true;
} }
static struct xt_match xt_comment_match[] = { static struct xt_match xt_comment_match[] __read_mostly = {
{ {
.name = "comment", .name = "comment",
.family = AF_INET, .family = AF_INET,
......
...@@ -128,7 +128,7 @@ destroy(const struct xt_match *match, void *matchinfo) ...@@ -128,7 +128,7 @@ destroy(const struct xt_match *match, void *matchinfo)
nf_ct_l3proto_module_put(match->family); nf_ct_l3proto_module_put(match->family);
} }
static struct xt_match xt_connbytes_match[] = { static struct xt_match xt_connbytes_match[] __read_mostly = {
{ {
.name = "connbytes", .name = "connbytes",
.family = AF_INET, .family = AF_INET,
......
...@@ -109,7 +109,7 @@ static int compat_to_user(void __user *dst, void *src) ...@@ -109,7 +109,7 @@ static int compat_to_user(void __user *dst, void *src)
} }
#endif /* CONFIG_COMPAT */ #endif /* CONFIG_COMPAT */
static struct xt_match xt_connmark_match[] = { static struct xt_match xt_connmark_match[] __read_mostly = {
{ {
.name = "connmark", .name = "connmark",
.family = AF_INET, .family = AF_INET,
......
...@@ -183,7 +183,7 @@ static int compat_to_user(void __user *dst, void *src) ...@@ -183,7 +183,7 @@ static int compat_to_user(void __user *dst, void *src)
} }
#endif #endif
static struct xt_match conntrack_match = { static struct xt_match conntrack_match __read_mostly = {
.name = "conntrack", .name = "conntrack",
.match = match, .match = match,
.checkentry = checkentry, .checkentry = checkentry,
......
...@@ -140,7 +140,7 @@ checkentry(const char *tablename, ...@@ -140,7 +140,7 @@ checkentry(const char *tablename,
&& !(info->invflags & ~info->flags); && !(info->invflags & ~info->flags);
} }
static struct xt_match xt_dccp_match[] = { static struct xt_match xt_dccp_match[] __read_mostly = {
{ {
.name = "dccp", .name = "dccp",
.family = AF_INET, .family = AF_INET,
......
...@@ -68,7 +68,7 @@ static bool checkentry(const char *tablename, ...@@ -68,7 +68,7 @@ static bool checkentry(const char *tablename,
return true; return true;
} }
static struct xt_match xt_dscp_match[] = { static struct xt_match xt_dscp_match[] __read_mostly = {
{ {
.name = "dscp", .name = "dscp",
.family = AF_INET, .family = AF_INET,
......
...@@ -91,7 +91,7 @@ checkentry(const char *tablename, ...@@ -91,7 +91,7 @@ checkentry(const char *tablename,
return true; return true;
} }
static struct xt_match xt_esp_match[] = { static struct xt_match xt_esp_match[] __read_mostly = {
{ {
.name = "esp", .name = "esp",
.family = AF_INET, .family = AF_INET,
......
...@@ -578,7 +578,7 @@ static int compat_to_user(void __user *dst, void *src) ...@@ -578,7 +578,7 @@ static int compat_to_user(void __user *dst, void *src)
} }
#endif #endif
static struct xt_match xt_hashlimit[] = { static struct xt_match xt_hashlimit[] __read_mostly = {
{ {
.name = "hashlimit", .name = "hashlimit",
.family = AF_INET, .family = AF_INET,
......
...@@ -99,7 +99,7 @@ destroy(const struct xt_match *match, void *matchinfo) ...@@ -99,7 +99,7 @@ destroy(const struct xt_match *match, void *matchinfo)
nf_ct_l3proto_module_put(match->family); nf_ct_l3proto_module_put(match->family);
} }
static struct xt_match xt_helper_match[] = { static struct xt_match xt_helper_match[] __read_mostly = {
{ {
.name = "helper", .name = "helper",
.family = AF_INET, .family = AF_INET,
......
...@@ -53,7 +53,7 @@ match6(const struct sk_buff *skb, ...@@ -53,7 +53,7 @@ match6(const struct sk_buff *skb,
return (pktlen >= info->min && pktlen <= info->max) ^ info->invert; return (pktlen >= info->min && pktlen <= info->max) ^ info->invert;
} }
static struct xt_match xt_length_match[] = { static struct xt_match xt_length_match[] __read_mostly = {
{ {
.name = "length", .name = "length",
.family = AF_INET, .family = AF_INET,
......
...@@ -173,7 +173,7 @@ static int compat_to_user(void __user *dst, void *src) ...@@ -173,7 +173,7 @@ static int compat_to_user(void __user *dst, void *src)
} }
#endif /* CONFIG_COMPAT */ #endif /* CONFIG_COMPAT */
static struct xt_match xt_limit_match[] = { static struct xt_match xt_limit_match[] __read_mostly = {
{ {
.name = "limit", .name = "limit",
.family = AF_INET, .family = AF_INET,
......
...@@ -44,7 +44,7 @@ match(const struct sk_buff *skb, ...@@ -44,7 +44,7 @@ match(const struct sk_buff *skb,
^ info->invert); ^ info->invert);
} }
static struct xt_match xt_mac_match[] = { static struct xt_match xt_mac_match[] __read_mostly = {
{ {
.name = "mac", .name = "mac",
.family = AF_INET, .family = AF_INET,
......
...@@ -81,7 +81,7 @@ static int compat_to_user(void __user *dst, void *src) ...@@ -81,7 +81,7 @@ static int compat_to_user(void __user *dst, void *src)
} }
#endif /* CONFIG_COMPAT */ #endif /* CONFIG_COMPAT */
static struct xt_match xt_mark_match[] = { static struct xt_match xt_mark_match[] __read_mostly = {
{ {
.name = "mark", .name = "mark",
.family = AF_INET, .family = AF_INET,
......
...@@ -228,7 +228,7 @@ checkentry6_v1(const char *tablename, ...@@ -228,7 +228,7 @@ checkentry6_v1(const char *tablename,
multiinfo->count); multiinfo->count);
} }
static struct xt_match xt_multiport_match[] = { static struct xt_match xt_multiport_match[] __read_mostly = {
{ {
.name = "multiport", .name = "multiport",
.family = AF_INET, .family = AF_INET,
......
...@@ -125,7 +125,7 @@ checkentry(const char *tablename, ...@@ -125,7 +125,7 @@ checkentry(const char *tablename,
return true; return true;
} }
static struct xt_match xt_physdev_match[] = { static struct xt_match xt_physdev_match[] __read_mostly = {
{ {
.name = "physdev", .name = "physdev",
.family = AF_INET, .family = AF_INET,
......
...@@ -43,7 +43,7 @@ static bool match(const struct sk_buff *skb, ...@@ -43,7 +43,7 @@ static bool match(const struct sk_buff *skb,
return (type == info->pkttype) ^ info->invert; return (type == info->pkttype) ^ info->invert;
} }
static struct xt_match xt_pkttype_match[] = { static struct xt_match xt_pkttype_match[] __read_mostly = {
{ {
.name = "pkttype", .name = "pkttype",
.family = AF_INET, .family = AF_INET,
......
...@@ -164,7 +164,7 @@ static bool checkentry(const char *tablename, const void *ip_void, ...@@ -164,7 +164,7 @@ static bool checkentry(const char *tablename, const void *ip_void,
return true; return true;
} }
static struct xt_match xt_policy_match[] = { static struct xt_match xt_policy_match[] __read_mostly = {
{ {
.name = "policy", .name = "policy",
.family = AF_INET, .family = AF_INET,
......
...@@ -53,7 +53,7 @@ checkentry(const char *tablename, const void *entry, ...@@ -53,7 +53,7 @@ checkentry(const char *tablename, const void *entry,
return true; return true;
} }
static struct xt_match xt_quota_match[] = { static struct xt_match xt_quota_match[] __read_mostly = {
{ {
.name = "quota", .name = "quota",
.family = AF_INET, .family = AF_INET,
......
...@@ -37,7 +37,7 @@ match(const struct sk_buff *skb, ...@@ -37,7 +37,7 @@ match(const struct sk_buff *skb,
return (info->id == (dst->tclassid & info->mask)) ^ info->invert; return (info->id == (dst->tclassid & info->mask)) ^ info->invert;
} }
static struct xt_match realm_match = { static struct xt_match realm_match __read_mostly = {
.name = "realm", .name = "realm",
.match = match, .match = match,
.matchsize = sizeof(struct xt_realm_info), .matchsize = sizeof(struct xt_realm_info),
......
...@@ -172,7 +172,7 @@ checkentry(const char *tablename, ...@@ -172,7 +172,7 @@ checkentry(const char *tablename,
| SCTP_CHUNK_MATCH_ONLY))); | SCTP_CHUNK_MATCH_ONLY)));
} }
static struct xt_match xt_sctp_match[] = { static struct xt_match xt_sctp_match[] __read_mostly = {
{ {
.name = "sctp", .name = "sctp",
.family = AF_INET, .family = AF_INET,
......
...@@ -64,7 +64,7 @@ destroy(const struct xt_match *match, void *matchinfo) ...@@ -64,7 +64,7 @@ destroy(const struct xt_match *match, void *matchinfo)
nf_ct_l3proto_module_put(match->family); nf_ct_l3proto_module_put(match->family);
} }
static struct xt_match xt_state_match[] = { static struct xt_match xt_state_match[] __read_mostly = {
{ {
.name = "state", .name = "state",
.family = AF_INET, .family = AF_INET,
......
...@@ -66,7 +66,7 @@ checkentry(const char *tablename, const void *entry, ...@@ -66,7 +66,7 @@ checkentry(const char *tablename, const void *entry,
return true; return true;
} }
static struct xt_match xt_statistic_match[] = { static struct xt_match xt_statistic_match[] __read_mostly = {
{ {
.name = "statistic", .name = "statistic",
.family = AF_INET, .family = AF_INET,
......
...@@ -73,7 +73,7 @@ static void destroy(const struct xt_match *match, void *matchinfo) ...@@ -73,7 +73,7 @@ static void destroy(const struct xt_match *match, void *matchinfo)
textsearch_destroy(STRING_TEXT_PRIV(matchinfo)->config); textsearch_destroy(STRING_TEXT_PRIV(matchinfo)->config);
} }
static struct xt_match xt_string_match[] = { static struct xt_match xt_string_match[] __read_mostly = {
{ {
.name = "string", .name = "string",
.family = AF_INET, .family = AF_INET,
......
...@@ -81,7 +81,7 @@ match(const struct sk_buff *skb, ...@@ -81,7 +81,7 @@ match(const struct sk_buff *skb,
return false; return false;
} }
static struct xt_match xt_tcpmss_match[] = { static struct xt_match xt_tcpmss_match[] __read_mostly = {
{ {
.name = "tcpmss", .name = "tcpmss",
.family = AF_INET, .family = AF_INET,
......
...@@ -194,7 +194,7 @@ udp_checkentry(const char *tablename, ...@@ -194,7 +194,7 @@ udp_checkentry(const char *tablename,
return !(udpinfo->invflags & ~XT_UDP_INV_MASK); return !(udpinfo->invflags & ~XT_UDP_INV_MASK);
} }
static struct xt_match xt_tcpudp_match[] = { static struct xt_match xt_tcpudp_match[] __read_mostly = {
{ {
.name = "tcp", .name = "tcp",
.family = AF_INET, .family = AF_INET,
......
...@@ -99,7 +99,7 @@ static bool u32_match(const struct sk_buff *skb, ...@@ -99,7 +99,7 @@ static bool u32_match(const struct sk_buff *skb,
return ret ^ data->invert; return ret ^ data->invert;
} }
static struct xt_match u32_reg[] = { static struct xt_match u32_reg[] __read_mostly = {
{ {
.name = "u32", .name = "u32",
.family = AF_INET, .family = AF_INET,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment