[PATCH 2/3] ipv6: use addrconf_get_prefix_route() to remove peer addr
Tim Gardner
tim.gardner at canonical.com
Mon Feb 6 14:17:56 UTC 2017
From: Nicolas Dichtel <nicolas.dichtel at 6wind.com>
BugLink: http://bugs.launchpad.net/bugs/1662096
addrconf_get_prefix_route() ensures to get the right route in the right table.
Signed-off-by: Nicolas Dichtel <nicolas.dichtel at 6wind.com>
Acked-by: Hannes Frederic Sowa <hannes at stressinduktion.org>
Signed-off-by: David S. Miller <davem at davemloft.net>
(cherry picked from commit e7478dfc4656f4a739ed1b07cfd59c12f8eb112e)
Signed-off-by: Tim Gardner <tim.gardner at canonical.com>
---
net/ipv6/addrconf.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index 8ae7618..6a7e788 100644
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -4575,10 +4575,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);
}
--
2.7.4
More information about the kernel-team
mailing list