aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/anycast.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv6/anycast.c')
-rw-r--r--net/ipv6/anycast.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/net/ipv6/anycast.c b/net/ipv6/anycast.c
index 36e817492095..4e1b29fabdf0 100644
--- a/net/ipv6/anycast.c
+++ b/net/ipv6/anycast.c
@@ -314,9 +314,7 @@ int ipv6_dev_ac_inc(struct net_device *dev, struct in6_addr *addr)
314 idev->ac_list = aca; 314 idev->ac_list = aca;
315 write_unlock_bh(&idev->lock); 315 write_unlock_bh(&idev->lock);
316 316
317 dst_hold(&rt->u.dst); 317 ip6_ins_rt(rt);
318 if (ip6_ins_rt(rt))
319 dst_release(&rt->u.dst);
320 318
321 addrconf_join_solict(dev, &aca->aca_addr); 319 addrconf_join_solict(dev, &aca->aca_addr);
322 320
@@ -358,10 +356,7 @@ int __ipv6_dev_ac_dec(struct inet6_dev *idev, struct in6_addr *addr)
358 addrconf_leave_solict(idev, &aca->aca_addr); 356 addrconf_leave_solict(idev, &aca->aca_addr);
359 357
360 dst_hold(&aca->aca_rt->u.dst); 358 dst_hold(&aca->aca_rt->u.dst);
361 if (ip6_del_rt(aca->aca_rt)) 359 ip6_del_rt(aca->aca_rt);
362 dst_free(&aca->aca_rt->u.dst);
363 else
364 dst_release(&aca->aca_rt->u.dst);
365 360
366 aca_put(aca); 361 aca_put(aca);
367 return 0; 362 return 0;