Skip to content

Commit

Permalink
ipv6: use addrconf_get_prefix_route() to remove peer addr
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Nicolas Dichtel authored and David S. Miller committed Sep 6, 2014
1 parent f24062b commit e7478df
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions net/ipv6/addrconf.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit e7478df

Please sign in to comment.