Commit e8ced837 authored by Art Haas's avatar Art Haas Committed by David S. Miller

[PATCH] Add C99 initializers for net/ipv6/netfilter code.

parent 054f7565
...@@ -558,9 +558,7 @@ ipq_rcv_dev_event(struct notifier_block *this, ...@@ -558,9 +558,7 @@ ipq_rcv_dev_event(struct notifier_block *this,
} }
static struct notifier_block ipq_dev_notifier = { static struct notifier_block ipq_dev_notifier = {
ipq_rcv_dev_event, .notifier_call = ipq_rcv_dev_event,
NULL,
0
}; };
static int static int
...@@ -580,9 +578,7 @@ ipq_rcv_nl_event(struct notifier_block *this, ...@@ -580,9 +578,7 @@ ipq_rcv_nl_event(struct notifier_block *this,
} }
static struct notifier_block ipq_nl_notifier = { static struct notifier_block ipq_nl_notifier = {
ipq_rcv_nl_event, .notifier_call = ipq_rcv_nl_event,
NULL,
0
}; };
static int sysctl_maxlen = IPQ_QMAX_DEFAULT; static int sysctl_maxlen = IPQ_QMAX_DEFAULT;
...@@ -604,7 +600,6 @@ static ctl_table ipq_dir_table[] = { ...@@ -604,7 +600,6 @@ static ctl_table ipq_dir_table[] = {
{ {
.ctl_name = NET_IPV6, .ctl_name = NET_IPV6,
.procname = "ipv6", .procname = "ipv6",
.maxlen = 0,
.mode = 0555, .mode = 0555,
.child = ipq_table .child = ipq_table
}, },
...@@ -615,7 +610,6 @@ static ctl_table ipq_root_table[] = { ...@@ -615,7 +610,6 @@ static ctl_table ipq_root_table[] = {
{ {
.ctl_name = CTL_NET, .ctl_name = CTL_NET,
.procname = "net", .procname = "net",
.maxlen = 0,
.mode = 0555, .mode = 0555,
.child = ipq_dir_table .child = ipq_dir_table
}, },
......
...@@ -1735,21 +1735,42 @@ icmp6_checkentry(const char *tablename, ...@@ -1735,21 +1735,42 @@ icmp6_checkentry(const char *tablename,
} }
/* The built-in targets: standard (NULL) and error. */ /* The built-in targets: standard (NULL) and error. */
static struct ip6t_target ip6t_standard_target static struct ip6t_target ip6t_standard_target = {
= { { NULL, NULL }, IP6T_STANDARD_TARGET, NULL, NULL, NULL }; .name = IP6T_STANDARD_TARGET,
static struct ip6t_target ip6t_error_target };
= { { NULL, NULL }, IP6T_ERROR_TARGET, ip6t_error, NULL, NULL };
static struct ip6t_target ip6t_error_target = {
static struct nf_sockopt_ops ip6t_sockopts .name = IP6T_ERROR_TARGET,
= { { NULL, NULL }, PF_INET6, IP6T_BASE_CTL, IP6T_SO_SET_MAX+1, do_ip6t_set_ctl, .target = ip6t_error,
IP6T_BASE_CTL, IP6T_SO_GET_MAX+1, do_ip6t_get_ctl, 0, NULL }; };
static struct ip6t_match tcp_matchstruct static struct nf_sockopt_ops ip6t_sockopts = {
= { { NULL, NULL }, "tcp", &tcp_match, &tcp_checkentry, NULL }; .pf = PF_INET6,
static struct ip6t_match udp_matchstruct .set_optmin = IP6T_BASE_CTL,
= { { NULL, NULL }, "udp", &udp_match, &udp_checkentry, NULL }; .set_optmax = IP6T_SO_SET_MAX+1,
static struct ip6t_match icmp6_matchstruct .set = do_ip6t_set_ctl,
= { { NULL, NULL }, "icmp6", &icmp6_match, &icmp6_checkentry, NULL }; .get_optmin = IP6T_BASE_CTL,
.get_optmax = IP6T_SO_GET_MAX+1,
.get = do_ip6t_get_ctl,
};
static struct ip6t_match tcp_matchstruct = {
.name = "tcp",
.match = &tcp_match,
.checkentry = &tcp_checkentry,
};
static struct ip6t_match udp_matchstruct = {
.name = "udp",
.match = &udp_match,
.checkentry = &udp_checkentry,
};
static struct ip6t_match icmp6_matchstruct = {
.name = "icmp6",
.match = &icmp6_match,
.checkentry = &icmp6_checkentry,
};
#ifdef CONFIG_PROC_FS #ifdef CONFIG_PROC_FS
static inline int print_name(const struct ip6t_table *t, static inline int print_name(const struct ip6t_table *t,
......
...@@ -200,8 +200,12 @@ checkentry(const char *tablename, ...@@ -200,8 +200,12 @@ checkentry(const char *tablename,
return 1; return 1;
} }
static struct ip6t_match ah_match static struct ip6t_match ah_match = {
= { { NULL, NULL }, "ah", &match, &checkentry, NULL, THIS_MODULE }; .name = "ah",
.match = &match,
.checkentry = &checkentry,
.me = THIS_MODULE,
};
static int __init init(void) static int __init init(void)
{ {
......
...@@ -265,12 +265,15 @@ checkentry(const char *tablename, ...@@ -265,12 +265,15 @@ checkentry(const char *tablename,
return 1; return 1;
} }
static struct ip6t_match opts_match static struct ip6t_match opts_match = {
#if HOPBYHOP #if HOPBYHOP
= { { NULL, NULL }, "hbh", &match, &checkentry, NULL, THIS_MODULE }; .name = "hbh",
#else #else
= { { NULL, NULL }, "dst", &match, &checkentry, NULL, THIS_MODULE }; .name = "dst",
#endif #endif
.match = &match,
.checkentry = &checkentry,
};
static int __init init(void) static int __init init(void)
{ {
......
...@@ -168,8 +168,12 @@ checkentry(const char *tablename, ...@@ -168,8 +168,12 @@ checkentry(const char *tablename,
return 1; return 1;
} }
static struct ip6t_match esp_match static struct ip6t_match esp_match = {
= { { NULL, NULL }, "esp", &match, &checkentry, NULL, THIS_MODULE }; .name = "esp",
.match = &match,
.checkentry = &checkentry,
.me = THIS_MODULE,
};
static int __init init(void) static int __init init(void)
{ {
......
...@@ -69,8 +69,12 @@ ip6t_eui64_checkentry(const char *tablename, ...@@ -69,8 +69,12 @@ ip6t_eui64_checkentry(const char *tablename,
return 1; return 1;
} }
static struct ip6t_match eui64_match static struct ip6t_match eui64_match = {
= { { NULL, NULL }, "eui64", &match, &ip6t_eui64_checkentry, NULL, THIS_MODULE }; .name = "eui64",
.match = &match,
.checkentry = &ip6t_eui64_checkentry,
.me = THIS_MODULE,
};
static int __init init(void) static int __init init(void)
{ {
......
...@@ -232,8 +232,12 @@ checkentry(const char *tablename, ...@@ -232,8 +232,12 @@ checkentry(const char *tablename,
return 1; return 1;
} }
static struct ip6t_match frag_match static struct ip6t_match frag_match = {
= { { NULL, NULL }, "frag", &match, &checkentry, NULL, THIS_MODULE }; .name = "frag",
.match = &match,
.checkentry = &checkentry,
.me = THIS_MODULE,
};
static int __init init(void) static int __init init(void)
{ {
......
...@@ -265,12 +265,16 @@ checkentry(const char *tablename, ...@@ -265,12 +265,16 @@ checkentry(const char *tablename,
return 1; return 1;
} }
static struct ip6t_match opts_match static struct ip6t_match opts_match = {
#if HOPBYHOP #if HOPBYHOP
= { { NULL, NULL }, "hbh", &match, &checkentry, NULL, THIS_MODULE }; .name = "hbh",
#else #else
= { { NULL, NULL }, "dst", &match, &checkentry, NULL, THIS_MODULE }; .name = "dst",
#endif #endif
.match = &match,
.checkentry = &checkentry,
.me = THIS_MODULE,
};
static int __init init(void) static int __init init(void)
{ {
......
...@@ -56,8 +56,12 @@ static int checkentry(const char *tablename, const struct ip6t_ip6 *ip, ...@@ -56,8 +56,12 @@ static int checkentry(const char *tablename, const struct ip6t_ip6 *ip,
return 1; return 1;
} }
static struct ip6t_match hl_match = { { NULL, NULL }, "hl", &match, static struct ip6t_match hl_match = {
&checkentry, NULL, THIS_MODULE }; .name = "hl",
.match = &match,
.checkentry = &checkentry,
.me = THIS_MODULE,
};
static int __init init(void) static int __init init(void)
{ {
......
...@@ -196,14 +196,12 @@ ipv6header_destroy(void *matchinfo, ...@@ -196,14 +196,12 @@ ipv6header_destroy(void *matchinfo,
return; return;
} }
static struct ip6t_match static struct ip6t_match ip6t_ipv6header_match = {
ip6t_ipv6header_match = { .name = "ipv6header",
{ NULL, NULL }, .match = &ipv6header_match,
"ipv6header", .checkentry = &ipv6header_checkentry,
&ipv6header_match, .destroy = &ipv6header_destroy,
&ipv6header_checkentry, .me = THIS_MODULE,
&ipv6header_destroy,
THIS_MODULE
}; };
static int __init ipv6header_init(void) static int __init ipv6header_init(void)
......
...@@ -34,8 +34,12 @@ checkentry(const char *tablename, ...@@ -34,8 +34,12 @@ checkentry(const char *tablename,
return 1; return 1;
} }
static struct ip6t_match length_match static struct ip6t_match length_match = {
= { { NULL, NULL }, "length", &match, &checkentry, NULL, THIS_MODULE }; .name = "length",
.match = &match,
.checkentry = &checkentry,
.me = THIS_MODULE,
};
static int __init init(void) static int __init init(void)
{ {
......
...@@ -115,9 +115,12 @@ ip6t_limit_checkentry(const char *tablename, ...@@ -115,9 +115,12 @@ ip6t_limit_checkentry(const char *tablename,
return 1; return 1;
} }
static struct ip6t_match ip6t_limit_reg static struct ip6t_match ip6t_limit_reg = {
= { { NULL, NULL }, "limit", ip6t_limit_match, ip6t_limit_checkentry, NULL, .name = "limit",
THIS_MODULE }; .match = ip6t_limit_match,
.checkentry = ip6t_limit_checkentry,
.me = THIS_MODULE,
};
static int __init init(void) static int __init init(void)
{ {
......
...@@ -47,8 +47,12 @@ ip6t_mac_checkentry(const char *tablename, ...@@ -47,8 +47,12 @@ ip6t_mac_checkentry(const char *tablename,
return 1; return 1;
} }
static struct ip6t_match mac_match static struct ip6t_match mac_match = {
= { { NULL, NULL }, "mac", &match, &ip6t_mac_checkentry, NULL, THIS_MODULE }; .name = "mac",
.match = &match,
.checkentry = &ip6t_mac_checkentry,
.me = THIS_MODULE,
};
static int __init init(void) static int __init init(void)
{ {
......
...@@ -33,8 +33,12 @@ checkentry(const char *tablename, ...@@ -33,8 +33,12 @@ checkentry(const char *tablename,
return 1; return 1;
} }
static struct ip6t_match mark_match static struct ip6t_match mark_match = {
= { { NULL, NULL }, "mark", &match, &checkentry, NULL, THIS_MODULE }; .name = "mark",
.match = &match,
.checkentry = &checkentry,
.me = THIS_MODULE,
};
static int __init init(void) static int __init init(void)
{ {
......
...@@ -84,8 +84,12 @@ checkentry(const char *tablename, ...@@ -84,8 +84,12 @@ checkentry(const char *tablename,
&& multiinfo->count <= IP6T_MULTI_PORTS; && multiinfo->count <= IP6T_MULTI_PORTS;
} }
static struct ip6t_match multiport_match static struct ip6t_match multiport_match = {
= { { NULL, NULL }, "multiport", &match, &checkentry, NULL, THIS_MODULE }; .name = "multiport",
.match = &match,
.checkentry = &checkentry,
.me = THIS_MODULE,
};
static int __init init(void) static int __init init(void)
{ {
......
...@@ -142,8 +142,12 @@ checkentry(const char *tablename, ...@@ -142,8 +142,12 @@ checkentry(const char *tablename,
return 1; return 1;
} }
static struct ip6t_match owner_match static struct ip6t_match owner_match = {
= { { NULL, NULL }, "owner", &match, &checkentry, NULL, THIS_MODULE }; .name = "owner",
.match = &match,
.checkentry = &checkentry,
.me = THIS_MODULE,
};
static int __init init(void) static int __init init(void)
{ {
......
...@@ -287,8 +287,12 @@ checkentry(const char *tablename, ...@@ -287,8 +287,12 @@ checkentry(const char *tablename,
return 1; return 1;
} }
static struct ip6t_match rt_match static struct ip6t_match rt_match = {
= { { NULL, NULL }, "rt", &match, &checkentry, NULL, THIS_MODULE }; .name = "rt",
.match = &match,
.checkentry = &checkentry,
.me = THIS_MODULE,
};
static int __init init(void) static int __init init(void)
{ {
......
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