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,42 +38,71 @@ static struct ...@@ -38,42 +38,71 @@ 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)
},
.underflow = {
[NF_IP6_PRE_ROUTING] = 0,
[NF_IP6_LOCAL_OUT] = sizeof(struct ip6t_standard)
},
},
.entries = {
/* PRE_ROUTING */ /* PRE_ROUTING */
{ { { { { { 0 } } }, { { { 0 } } }, { { { 0 } } }, { { { 0 } } }, "", "", { 0 }, { 0 }, 0, 0, 0 }, {
0, .entry = {
sizeof(struct ip6t_entry), .target_offset = sizeof(struct ip6t_entry),
sizeof(struct ip6t_standard), .next_offset = sizeof(struct ip6t_standard),
0, { 0, 0 }, { } }, },
{ { { { IP6T_ALIGN(sizeof(struct ip6t_standard_target)), "" } }, { } }, .target = {
-NF_ACCEPT - 1 } }, .target = {
.u = {
.target_size = IP6T_ALIGN(sizeof(struct ip6t_standard_target)),
},
},
.verdict = -NF_ACCEPT - 1,
},
},
/* LOCAL_OUT */ /* LOCAL_OUT */
{ { { { { { 0 } } }, { { { 0 } } }, { { { 0 } } }, { { { 0 } } }, "", "", { 0 }, { 0 }, 0, 0, 0 }, {
0, .entry = {
sizeof(struct ip6t_entry), .target_offset = sizeof(struct ip6t_entry),
sizeof(struct ip6t_standard), .next_offset sizeof(struct ip6t_standard),
0, { 0, 0 }, { } }, },
{ { { { IP6T_ALIGN(sizeof(struct ip6t_standard_target)), "" } }, { } }, .target = {
-NF_ACCEPT - 1 } }, .target = {
.u = {
.target_size = IP6T_ALIGN(sizeof(struct ip6t_standard_target)),
},
},
.verdict = -NF_ACCEPT - 1,
},
},
}, },
/* ERROR */ /* ERROR */
{ { { { { { 0 } } }, { { { 0 } } }, { { { 0 } } }, { { { 0 } } }, "", "", { 0 }, { 0 }, 0, 0, 0 }, .term = {
0, .entry = {
sizeof(struct ip6t_entry), .target_offset = sizeof(struct ip6t_entry),
sizeof(struct ip6t_error), .next_offset = sizeof(struct ip6t_error),
0, { 0, 0 }, { } }, },
{ { { { IP6T_ALIGN(sizeof(struct ip6t_error_target)), IP6T_ERROR_TARGET } }, .target = {
{ } }, .target = {
"ERROR" .u = {
} .user = {
.target_size = IP6T_ALIGN(sizeof(struct ip6t_error_target)),
.name = IP6T_ERROR_TARGET,
},
},
},
.errorname = "ERROR",
},
} }
}; };
......
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