o ipv6/icmp: use C99 struct style init for tab_unreach

parent 1c320830
...@@ -737,11 +737,26 @@ static struct icmp6_err { ...@@ -737,11 +737,26 @@ static struct icmp6_err {
int err; int err;
int fatal; int fatal;
} tab_unreach[] = { } tab_unreach[] = {
{ ENETUNREACH, 0}, /* NOROUTE */ { /* NOROUTE */
{ EACCES, 1}, /* ADM_PROHIBITED */ .err = ENETUNREACH,
{ EHOSTUNREACH, 0}, /* Was NOT_NEIGHBOUR, now reserved */ .fatal = 0,
{ EHOSTUNREACH, 0}, /* ADDR_UNREACH */ },
{ ECONNREFUSED, 1}, /* PORT_UNREACH */ { /* ADM_PROHIBITED */
.err = EACCES,
.fatal = 1,
},
{ /* Was NOT_NEIGHBOUR, now reserved */
.err = EHOSTUNREACH,
.fatal = 0,
},
{ /* ADDR_UNREACH */
.err = EHOSTUNREACH,
.fatal = 0,
},
{ /* PORT_UNREACH */
.err = ECONNREFUSED,
.fatal = 1,
},
}; };
int icmpv6_err_convert(int type, int code, int *err) int icmpv6_err_convert(int type, int code, int *err)
......
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