From c56bf6fe785abbd83751a462f0c7067f7145b97a Mon Sep 17 00:00:00 2001 From: Eric Dumazet Date: Fri, 6 Jul 2012 09:19:05 +0200 Subject: [PATCH] ipv6: fix a bad cast in ip6_dst_lookup_tail() Fix a bug in ip6_dst_lookup_tail(), where typeof(dst) is "struct dst_entry **", not "struct dst_entry *" Reported-by: Fengguang Wu Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller --- net/ipv6/ip6_output.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c index 6d9c0abc8c20..c6af5963a202 100644 --- a/net/ipv6/ip6_output.c +++ b/net/ipv6/ip6_output.c @@ -975,7 +975,7 @@ static int ip6_dst_lookup_tail(struct sock *sk, * dst entry of the nexthop router */ rcu_read_lock(); - rt = (struct rt6_info *) dst; + rt = (struct rt6_info *) *dst; n = rt->n; if (n && !(n->nud_state & NUD_VALID)) { struct inet6_ifaddr *ifp;