]> git.baikalelectronics.ru Git - kernel.git/commitdiff
ipv6: use addrconf_get_prefix_route() to remove peer addr
authorNicolas Dichtel <nicolas.dichtel@6wind.com>
Wed, 3 Sep 2014 21:59:22 +0000 (23:59 +0200)
committerDavid S. Miller <davem@davemloft.net>
Sat, 6 Sep 2014 00:13:24 +0000 (17:13 -0700)
addrconf_get_prefix_route() ensures to get the right route in the right table.

Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Acked-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv6/addrconf.c

index ce761c7e6675521216732be46c3d86f028ed0dc3..fc1fac2a052856e5c1b2476dc469d261a6558e5e 100644 (file)
@@ -4768,10 +4768,9 @@ static void __ipv6_ifa_notify(int event, struct inet6_ifaddr *ifp)
                addrconf_leave_solict(ifp->idev, &ifp->addr);
                if (!ipv6_addr_any(&ifp->peer_addr)) {
                        struct rt6_info *rt;
-                       struct net_device *dev = ifp->idev->dev;
 
-                       rt = rt6_lookup(dev_net(dev), &ifp->peer_addr, NULL,
-                                       dev->ifindex, 1);
+                       rt = addrconf_get_prefix_route(&ifp->peer_addr, 128,
+                                                      ifp->idev->dev, 0, 0);
                        if (rt && ip6_del_rt(rt))
                                dst_free(&rt->dst);
                }