summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--net/ipv6/exthdrs.c26
-rw-r--r--net/ipv6/icmp.c25
-rw-r--r--net/ipv6/ip6_fib.c5
3 files changed, 37 insertions, 19 deletions
diff --git a/net/ipv6/exthdrs.c b/net/ipv6/exthdrs.c
index 8e9c674a0647..10e6b8a7fe01 100644
--- a/net/ipv6/exthdrs.c
+++ b/net/ipv6/exthdrs.c
@@ -54,10 +54,9 @@
* It MUST NOT touch skb->h.
*/
-struct tlvtype_proc
-{
+struct tlvtype_proc {
int type;
- int (*func) (struct sk_buff *, int offset);
+ int (*func)(struct sk_buff *skb, int offset);
};
/*********************
@@ -175,8 +174,7 @@ static int ipv6_destopt_rcv(struct sk_buff **skbp, unsigned int *nhoffp)
return -1;
}
-static struct inet6_protocol destopt_protocol =
-{
+static struct inet6_protocol destopt_protocol = {
.handler = ipv6_destopt_rcv,
.flags = INET6_PROTO_NOPOLICY,
};
@@ -199,8 +197,7 @@ static int ipv6_nodata_rcv(struct sk_buff **skbp, unsigned int *nhoffp)
return 0;
}
-static struct inet6_protocol nodata_protocol =
-{
+static struct inet6_protocol nodata_protocol = {
.handler = ipv6_nodata_rcv,
.flags = INET6_PROTO_NOPOLICY,
};
@@ -328,8 +325,7 @@ looped_back:
return -1;
}
-static struct inet6_protocol rthdr_protocol =
-{
+static struct inet6_protocol rthdr_protocol = {
.handler = ipv6_rthdr_rcv,
.flags = INET6_PROTO_NOPOLICY,
};
@@ -462,9 +458,15 @@ drop:
}
static struct tlvtype_proc tlvprochopopt_lst[] = {
- {IPV6_TLV_ROUTERALERT, ipv6_hop_ra},
- {IPV6_TLV_JUMBO, ipv6_hop_jumbo},
- {-1, NULL}
+ {
+ .type = IPV6_TLV_ROUTERALERT,
+ .func = ipv6_hop_ra,
+ },
+ {
+ .type = IPV6_TLV_JUMBO,
+ .func = ipv6_hop_jumbo,
+ },
+ { -1, }
};
int ipv6_parse_hopopts(struct sk_buff *skb, int nhoff)
diff --git a/net/ipv6/icmp.c b/net/ipv6/icmp.c
index b00184b4574d..eebef46839ca 100644
--- a/net/ipv6/icmp.c
+++ b/net/ipv6/icmp.c
@@ -737,11 +737,26 @@ static struct icmp6_err {
int err;
int fatal;
} tab_unreach[] = {
- { ENETUNREACH, 0}, /* NOROUTE */
- { EACCES, 1}, /* ADM_PROHIBITED */
- { EHOSTUNREACH, 0}, /* Was NOT_NEIGHBOUR, now reserved */
- { EHOSTUNREACH, 0}, /* ADDR_UNREACH */
- { ECONNREFUSED, 1}, /* PORT_UNREACH */
+ { /* NOROUTE */
+ .err = ENETUNREACH,
+ .fatal = 0,
+ },
+ { /* 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)
diff --git a/net/ipv6/ip6_fib.c b/net/ipv6/ip6_fib.c
index d92c13766899..73c347b2688f 100644
--- a/net/ipv6/ip6_fib.c
+++ b/net/ipv6/ip6_fib.c
@@ -91,12 +91,13 @@ static struct fib6_node * fib6_repair_tree(struct fib6_node *fn);
* result of redirects, path MTU changes, etc.
*/
-static __u32 rt_sernum = 0;
+static __u32 rt_sernum;
static struct timer_list ip6_fib_timer = TIMER_INITIALIZER(fib6_run_gc, 0, 0);
static struct fib6_walker_t fib6_walker_list = {
- &fib6_walker_list, &fib6_walker_list,
+ .prev = &fib6_walker_list,
+ .next = &fib6_walker_list,
};
#define FOR_WALKERS(w) for ((w)=fib6_walker_list.next; (w) != &fib6_walker_list; (w)=(w)->next)