ipv6: fix a bad cast in ip6_dst_lookup_tail()
authorEric Dumazet <edumazet@google.com>
Fri, 6 Jul 2012 07:19:05 +0000 (09:19 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 6 Jul 2012 07:23:41 +0000 (00:23 -0700)
Fix a bug in ip6_dst_lookup_tail(), where typeof(dst) is
"struct dst_entry **", not "struct dst_entry *"

Reported-by: Fengguang Wu <wfg@linux.intel.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv6/ip6_output.c

index 6d9c0abc8c200e2bfdb87eff48745dc848e553c6..c6af5963a20248f165d1fe5fac1dd41bd377028f 100644 (file)
@@ -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;