Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e7478dfc authored by Nicolas Dichtel's avatar Nicolas Dichtel Committed by David S. Miller
Browse files

ipv6: use addrconf_get_prefix_route() to remove peer addr



addrconf_get_prefix_route() ensures to get the right route in the right table.

Signed-off-by: default avatarNicolas Dichtel <nicolas.dichtel@6wind.com>
Acked-by: default avatarHannes Frederic Sowa <hannes@stressinduktion.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent f24062b0
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -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);
		}