diff mbox

[net,2/2] ipv6: use addrconf_get_prefix_route() to remove peer addr

Message ID 1409781562-4191-2-git-send-email-nicolas.dichtel@6wind.com
State Accepted, archived
Delegated to: David Miller
Headers show

Commit Message

Nicolas Dichtel Sept. 3, 2014, 9:59 p.m. UTC
addrconf_get_prefix_route() ensures to get the right route in the right table.

Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
---
 net/ipv6/addrconf.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

Comments

Hannes Frederic Sowa Sept. 3, 2014, 11:51 p.m. UTC | #1
On Wed, Sep 3, 2014, at 23:59, Nicolas Dichtel wrote:
> addrconf_get_prefix_route() ensures to get the right route in the right
> table.
> 
> Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>

Also good!

Acked-by: Hannes Frederic Sowa <hannes@stressinduktion.org>

Thanks,
Hannes
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
David Miller Sept. 6, 2014, 12:13 a.m. UTC | #2
From: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Date: Wed,  3 Sep 2014 23:59:22 +0200

> addrconf_get_prefix_route() ensures to get the right route in the right table.
> 
> Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>

Applied.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index e75ecb1e848b..bb9ca1655cc5 100644
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -4773,10 +4773,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);
 		}