Commit e1b7f396 authored by David S. Miller's avatar David S. Miller

[NETFILTER]: Fix initializer of ip6table.c:initial_table

Just because gcc accepts [index] bar as
[index] = bar is no reason to make use of
that gross construct.

Also fully C99ify
parent 00e11c5f
...@@ -38,43 +38,72 @@ static struct ...@@ -38,43 +38,72 @@ static struct
struct ip6t_replace repl; struct ip6t_replace repl;
struct ip6t_standard entries[2]; struct ip6t_standard entries[2];
struct ip6t_error term; struct ip6t_error term;
} initial_table __initdata } initial_table __initdata = {
= { { "raw", RAW_VALID_HOOKS, 3, .repl = {
sizeof(struct ip6t_standard) * 2 + sizeof(struct ip6t_error), .name = "raw",
{ [NF_IP6_PRE_ROUTING] 0, .valid_hooks = RAW_VALID_HOOKS,
[NF_IP6_LOCAL_OUT] sizeof(struct ip6t_standard) }, .num_entries = 3,
{ [NF_IP6_PRE_ROUTING] 0, .size = sizeof(struct ip6t_standard) * 2 + sizeof(struct ip6t_error),
[NF_IP6_LOCAL_OUT] sizeof(struct ip6t_standard) }, .hook_entry = {
0, NULL, { } }, [NF_IP6_PRE_ROUTING] = 0,
{ [NF_IP6_LOCAL_OUT] = sizeof(struct ip6t_standard)
/* PRE_ROUTING */ },
{ { { { { { 0 } } }, { { { 0 } } }, { { { 0 } } }, { { { 0 } } }, "", "", { 0 }, { 0 }, 0, 0, 0 }, .underflow = {
0, [NF_IP6_PRE_ROUTING] = 0,
sizeof(struct ip6t_entry), [NF_IP6_LOCAL_OUT] = sizeof(struct ip6t_standard)
sizeof(struct ip6t_standard), },
0, { 0, 0 }, { } }, },
{ { { { IP6T_ALIGN(sizeof(struct ip6t_standard_target)), "" } }, { } }, .entries = {
-NF_ACCEPT - 1 } }, /* PRE_ROUTING */
/* LOCAL_OUT */ {
{ { { { { { 0 } } }, { { { 0 } } }, { { { 0 } } }, { { { 0 } } }, "", "", { 0 }, { 0 }, 0, 0, 0 }, .entry = {
0, .target_offset = sizeof(struct ip6t_entry),
sizeof(struct ip6t_entry), .next_offset = sizeof(struct ip6t_standard),
sizeof(struct ip6t_standard), },
0, { 0, 0 }, { } }, .target = {
{ { { { IP6T_ALIGN(sizeof(struct ip6t_standard_target)), "" } }, { } }, .target = {
-NF_ACCEPT - 1 } }, .u = {
}, .target_size = IP6T_ALIGN(sizeof(struct ip6t_standard_target)),
/* ERROR */ },
{ { { { { { 0 } } }, { { { 0 } } }, { { { 0 } } }, { { { 0 } } }, "", "", { 0 }, { 0 }, 0, 0, 0 }, },
0, .verdict = -NF_ACCEPT - 1,
sizeof(struct ip6t_entry), },
sizeof(struct ip6t_error), },
0, { 0, 0 }, { } },
{ { { { IP6T_ALIGN(sizeof(struct ip6t_error_target)), IP6T_ERROR_TARGET } }, /* LOCAL_OUT */
{ } }, {
"ERROR" .entry = {
} .target_offset = sizeof(struct ip6t_entry),
} .next_offset sizeof(struct ip6t_standard),
},
.target = {
.target = {
.u = {
.target_size = IP6T_ALIGN(sizeof(struct ip6t_standard_target)),
},
},
.verdict = -NF_ACCEPT - 1,
},
},
},
/* ERROR */
.term = {
.entry = {
.target_offset = sizeof(struct ip6t_entry),
.next_offset = sizeof(struct ip6t_error),
},
.target = {
.target = {
.u = {
.user = {
.target_size = IP6T_ALIGN(sizeof(struct ip6t_error_target)),
.name = IP6T_ERROR_TARGET,
},
},
},
.errorname = "ERROR",
},
}
}; };
static struct ip6t_table packet_raw = { static struct ip6t_table packet_raw = {
......
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