net: fix NULL dereferences in check_peer_redir()
[~shefty/rdma-dev.git] / net / ipv6 / addrconf.c
index a55500cc0b29ab710e012d42f0862a95f4750669..f012ebd87b4338181f76d3154165eb1f41cd0ba4 100644 (file)
@@ -656,7 +656,7 @@ ipv6_add_addr(struct inet6_dev *idev, const struct in6_addr *addr, int pfxlen,
         * layer address of our nexhop router
         */
 
-       if (dst_get_neighbour(&rt->dst) == NULL)
+       if (dst_get_neighbour_raw(&rt->dst) == NULL)
                ifa->flags &= ~IFA_F_OPTIMISTIC;
 
        ifa->idev = idev;