summaryrefslogtreecommitdiffstats
path: root/net/ipv6/anycast.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2014-09-23 12:09:27 -0400
committerDavid S. Miller <davem@davemloft.net>2014-09-23 12:09:27 -0400
commit1f6d80358dc9bbbeb56cb43384fa11fd645d9289 (patch)
tree152bfa5165292a8e4f06d536b6d222a68480e573 /net/ipv6/anycast.c
parenta2aeb02a8e6a9fef397c344245a54eeae67341f6 (diff)
parent98f75b8291a89ba6bf73e322ee467ce0bfeb91c1 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Conflicts: arch/mips/net/bpf_jit.c drivers/net/can/flexcan.c Both the flexcan and MIPS bpf_jit conflicts were cases of simple overlapping changes. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/anycast.c')
-rw-r--r--net/ipv6/anycast.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/net/ipv6/anycast.c b/net/ipv6/anycast.c
index 952c1fd06150..f5e319a8d4e2 100644
--- a/net/ipv6/anycast.c
+++ b/net/ipv6/anycast.c
@@ -345,6 +345,27 @@ static int ipv6_dev_ac_dec(struct net_device *dev, const struct in6_addr *addr)
345 return __ipv6_dev_ac_dec(idev, addr); 345 return __ipv6_dev_ac_dec(idev, addr);
346} 346}
347 347
348void ipv6_ac_destroy_dev(struct inet6_dev *idev)
349{
350 struct ifacaddr6 *aca;
351
352 write_lock_bh(&idev->lock);
353 while ((aca = idev->ac_list) != NULL) {
354 idev->ac_list = aca->aca_next;
355 write_unlock_bh(&idev->lock);
356
357 addrconf_leave_solict(idev, &aca->aca_addr);
358
359 dst_hold(&aca->aca_rt->dst);
360 ip6_del_rt(aca->aca_rt);
361
362 aca_put(aca);
363
364 write_lock_bh(&idev->lock);
365 }
366 write_unlock_bh(&idev->lock);
367}
368
348/* 369/*
349 * check if the interface has this anycast address 370 * check if the interface has this anycast address
350 * called with rcu_read_lock() 371 * called with rcu_read_lock()