[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>
This commit is contained in:
committed by
David S. Miller
parent
ba9dda3ab5
commit
9f15c5302d
@ -39,7 +39,7 @@ target(struct sk_buff **pskb,
|
||||
return XT_CONTINUE;
|
||||
}
|
||||
|
||||
static struct xt_target xt_classify_target[] = {
|
||||
static struct xt_target xt_classify_target[] __read_mostly = {
|
||||
{
|
||||
.family = AF_INET,
|
||||
.name = "CLASSIFY",
|
||||
|
@ -142,7 +142,7 @@ static int compat_to_user(void __user *dst, void *src)
|
||||
}
|
||||
#endif /* CONFIG_COMPAT */
|
||||
|
||||
static struct xt_target xt_connmark_target[] = {
|
||||
static struct xt_target xt_connmark_target[] __read_mostly = {
|
||||
{
|
||||
.name = "CONNMARK",
|
||||
.family = AF_INET,
|
||||
|
@ -115,7 +115,7 @@ destroy(const struct xt_target *target, void *targinfo)
|
||||
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",
|
||||
.family = AF_INET,
|
||||
|
@ -81,7 +81,7 @@ static bool checkentry(const char *tablename,
|
||||
return true;
|
||||
}
|
||||
|
||||
static struct xt_target xt_dscp_target[] = {
|
||||
static struct xt_target xt_dscp_target[] __read_mostly = {
|
||||
{
|
||||
.name = "DSCP",
|
||||
.family = AF_INET,
|
||||
|
@ -133,7 +133,7 @@ static int compat_to_user_v1(void __user *dst, void *src)
|
||||
}
|
||||
#endif /* CONFIG_COMPAT */
|
||||
|
||||
static struct xt_target xt_mark_target[] = {
|
||||
static struct xt_target xt_mark_target[] __read_mostly = {
|
||||
{
|
||||
.name = "MARK",
|
||||
.family = AF_INET,
|
||||
|
@ -52,7 +52,7 @@ nflog_checkentry(const char *tablename, const void *entry,
|
||||
return true;
|
||||
}
|
||||
|
||||
static struct xt_target xt_nflog_target[] = {
|
||||
static struct xt_target xt_nflog_target[] __read_mostly = {
|
||||
{
|
||||
.name = "NFLOG",
|
||||
.family = AF_INET,
|
||||
|
@ -36,7 +36,7 @@ target(struct sk_buff **pskb,
|
||||
return NF_QUEUE_NR(tinfo->queuenum);
|
||||
}
|
||||
|
||||
static struct xt_target xt_nfqueue_target[] = {
|
||||
static struct xt_target xt_nfqueue_target[] __read_mostly = {
|
||||
{
|
||||
.name = "NFQUEUE",
|
||||
.family = AF_INET,
|
||||
|
@ -33,7 +33,7 @@ target(struct sk_buff **pskb,
|
||||
return XT_CONTINUE;
|
||||
}
|
||||
|
||||
static struct xt_target xt_notrack_target[] = {
|
||||
static struct xt_target xt_notrack_target[] __read_mostly = {
|
||||
{
|
||||
.name = "NOTRACK",
|
||||
.family = AF_INET,
|
||||
|
@ -109,7 +109,7 @@ static bool checkentry(const char *tablename, const void *entry,
|
||||
return true;
|
||||
}
|
||||
|
||||
static struct xt_target xt_secmark_target[] = {
|
||||
static struct xt_target xt_secmark_target[] __read_mostly = {
|
||||
{
|
||||
.name = "SECMARK",
|
||||
.family = AF_INET,
|
||||
|
@ -259,7 +259,7 @@ xt_tcpmss_checkentry6(const char *tablename,
|
||||
}
|
||||
#endif
|
||||
|
||||
static struct xt_target xt_tcpmss_reg[] = {
|
||||
static struct xt_target xt_tcpmss_reg[] __read_mostly = {
|
||||
{
|
||||
.family = AF_INET,
|
||||
.name = "TCPMSS",
|
||||
|
@ -21,7 +21,7 @@ target(struct sk_buff **pskb,
|
||||
return XT_CONTINUE;
|
||||
}
|
||||
|
||||
static struct xt_target xt_trace_target[] = {
|
||||
static struct xt_target xt_trace_target[] __read_mostly = {
|
||||
{
|
||||
.name = "TRACE",
|
||||
.family = AF_INET,
|
||||
|
@ -29,7 +29,7 @@ match(const struct sk_buff *skb,
|
||||
return true;
|
||||
}
|
||||
|
||||
static struct xt_match xt_comment_match[] = {
|
||||
static struct xt_match xt_comment_match[] __read_mostly = {
|
||||
{
|
||||
.name = "comment",
|
||||
.family = AF_INET,
|
||||
|
@ -128,7 +128,7 @@ destroy(const struct xt_match *match, void *matchinfo)
|
||||
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",
|
||||
.family = AF_INET,
|
||||
|
@ -109,7 +109,7 @@ static int compat_to_user(void __user *dst, void *src)
|
||||
}
|
||||
#endif /* CONFIG_COMPAT */
|
||||
|
||||
static struct xt_match xt_connmark_match[] = {
|
||||
static struct xt_match xt_connmark_match[] __read_mostly = {
|
||||
{
|
||||
.name = "connmark",
|
||||
.family = AF_INET,
|
||||
|
@ -183,7 +183,7 @@ static int compat_to_user(void __user *dst, void *src)
|
||||
}
|
||||
#endif
|
||||
|
||||
static struct xt_match conntrack_match = {
|
||||
static struct xt_match conntrack_match __read_mostly = {
|
||||
.name = "conntrack",
|
||||
.match = match,
|
||||
.checkentry = checkentry,
|
||||
|
@ -140,7 +140,7 @@ checkentry(const char *tablename,
|
||||
&& !(info->invflags & ~info->flags);
|
||||
}
|
||||
|
||||
static struct xt_match xt_dccp_match[] = {
|
||||
static struct xt_match xt_dccp_match[] __read_mostly = {
|
||||
{
|
||||
.name = "dccp",
|
||||
.family = AF_INET,
|
||||
|
@ -68,7 +68,7 @@ static bool checkentry(const char *tablename,
|
||||
return true;
|
||||
}
|
||||
|
||||
static struct xt_match xt_dscp_match[] = {
|
||||
static struct xt_match xt_dscp_match[] __read_mostly = {
|
||||
{
|
||||
.name = "dscp",
|
||||
.family = AF_INET,
|
||||
|
@ -91,7 +91,7 @@ checkentry(const char *tablename,
|
||||
return true;
|
||||
}
|
||||
|
||||
static struct xt_match xt_esp_match[] = {
|
||||
static struct xt_match xt_esp_match[] __read_mostly = {
|
||||
{
|
||||
.name = "esp",
|
||||
.family = AF_INET,
|
||||
|
@ -578,7 +578,7 @@ static int compat_to_user(void __user *dst, void *src)
|
||||
}
|
||||
#endif
|
||||
|
||||
static struct xt_match xt_hashlimit[] = {
|
||||
static struct xt_match xt_hashlimit[] __read_mostly = {
|
||||
{
|
||||
.name = "hashlimit",
|
||||
.family = AF_INET,
|
||||
|
@ -99,7 +99,7 @@ destroy(const struct xt_match *match, void *matchinfo)
|
||||
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",
|
||||
.family = AF_INET,
|
||||
|
@ -53,7 +53,7 @@ match6(const struct sk_buff *skb,
|
||||
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",
|
||||
.family = AF_INET,
|
||||
|
@ -173,7 +173,7 @@ static int compat_to_user(void __user *dst, void *src)
|
||||
}
|
||||
#endif /* CONFIG_COMPAT */
|
||||
|
||||
static struct xt_match xt_limit_match[] = {
|
||||
static struct xt_match xt_limit_match[] __read_mostly = {
|
||||
{
|
||||
.name = "limit",
|
||||
.family = AF_INET,
|
||||
|
@ -44,7 +44,7 @@ match(const struct sk_buff *skb,
|
||||
^ info->invert);
|
||||
}
|
||||
|
||||
static struct xt_match xt_mac_match[] = {
|
||||
static struct xt_match xt_mac_match[] __read_mostly = {
|
||||
{
|
||||
.name = "mac",
|
||||
.family = AF_INET,
|
||||
|
@ -81,7 +81,7 @@ static int compat_to_user(void __user *dst, void *src)
|
||||
}
|
||||
#endif /* CONFIG_COMPAT */
|
||||
|
||||
static struct xt_match xt_mark_match[] = {
|
||||
static struct xt_match xt_mark_match[] __read_mostly = {
|
||||
{
|
||||
.name = "mark",
|
||||
.family = AF_INET,
|
||||
|
@ -228,7 +228,7 @@ checkentry6_v1(const char *tablename,
|
||||
multiinfo->count);
|
||||
}
|
||||
|
||||
static struct xt_match xt_multiport_match[] = {
|
||||
static struct xt_match xt_multiport_match[] __read_mostly = {
|
||||
{
|
||||
.name = "multiport",
|
||||
.family = AF_INET,
|
||||
|
@ -125,7 +125,7 @@ checkentry(const char *tablename,
|
||||
return true;
|
||||
}
|
||||
|
||||
static struct xt_match xt_physdev_match[] = {
|
||||
static struct xt_match xt_physdev_match[] __read_mostly = {
|
||||
{
|
||||
.name = "physdev",
|
||||
.family = AF_INET,
|
||||
|
@ -43,7 +43,7 @@ static bool match(const struct sk_buff *skb,
|
||||
return (type == info->pkttype) ^ info->invert;
|
||||
}
|
||||
|
||||
static struct xt_match xt_pkttype_match[] = {
|
||||
static struct xt_match xt_pkttype_match[] __read_mostly = {
|
||||
{
|
||||
.name = "pkttype",
|
||||
.family = AF_INET,
|
||||
|
@ -164,7 +164,7 @@ static bool checkentry(const char *tablename, const void *ip_void,
|
||||
return true;
|
||||
}
|
||||
|
||||
static struct xt_match xt_policy_match[] = {
|
||||
static struct xt_match xt_policy_match[] __read_mostly = {
|
||||
{
|
||||
.name = "policy",
|
||||
.family = AF_INET,
|
||||
|
@ -53,7 +53,7 @@ checkentry(const char *tablename, const void *entry,
|
||||
return true;
|
||||
}
|
||||
|
||||
static struct xt_match xt_quota_match[] = {
|
||||
static struct xt_match xt_quota_match[] __read_mostly = {
|
||||
{
|
||||
.name = "quota",
|
||||
.family = AF_INET,
|
||||
|
@ -37,7 +37,7 @@ match(const struct sk_buff *skb,
|
||||
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",
|
||||
.match = match,
|
||||
.matchsize = sizeof(struct xt_realm_info),
|
||||
|
@ -172,7 +172,7 @@ checkentry(const char *tablename,
|
||||
| SCTP_CHUNK_MATCH_ONLY)));
|
||||
}
|
||||
|
||||
static struct xt_match xt_sctp_match[] = {
|
||||
static struct xt_match xt_sctp_match[] __read_mostly = {
|
||||
{
|
||||
.name = "sctp",
|
||||
.family = AF_INET,
|
||||
|
@ -64,7 +64,7 @@ destroy(const struct xt_match *match, void *matchinfo)
|
||||
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",
|
||||
.family = AF_INET,
|
||||
|
@ -66,7 +66,7 @@ checkentry(const char *tablename, const void *entry,
|
||||
return true;
|
||||
}
|
||||
|
||||
static struct xt_match xt_statistic_match[] = {
|
||||
static struct xt_match xt_statistic_match[] __read_mostly = {
|
||||
{
|
||||
.name = "statistic",
|
||||
.family = AF_INET,
|
||||
|
@ -73,7 +73,7 @@ static void destroy(const struct xt_match *match, void *matchinfo)
|
||||
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",
|
||||
.family = AF_INET,
|
||||
|
@ -81,7 +81,7 @@ dropit:
|
||||
return false;
|
||||
}
|
||||
|
||||
static struct xt_match xt_tcpmss_match[] = {
|
||||
static struct xt_match xt_tcpmss_match[] __read_mostly = {
|
||||
{
|
||||
.name = "tcpmss",
|
||||
.family = AF_INET,
|
||||
|
@ -194,7 +194,7 @@ udp_checkentry(const char *tablename,
|
||||
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",
|
||||
.family = AF_INET,
|
||||
|
@ -99,7 +99,7 @@ static bool u32_match(const struct sk_buff *skb,
|
||||
return ret ^ data->invert;
|
||||
}
|
||||
|
||||
static struct xt_match u32_reg[] = {
|
||||
static struct xt_match u32_reg[] __read_mostly = {
|
||||
{
|
||||
.name = "u32",
|
||||
.family = AF_INET,
|
||||
|
Reference in New Issue
Block a user