瀏覽代碼

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 <wfg@linux.intel.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Eric Dumazet 13 年之前
父節點
當前提交
c56bf6fe78
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      net/ipv6/ip6_output.c

+ 1 - 1
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;