diff options
author | David S. Miller <davem@davemloft.net> | 2008-04-08 11:33:36 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-04-08 11:33:36 +0200 |
commit | 8eefca4888c986d993b2571eb31f0397a5d0a178 (patch) | |
tree | adc659aba0eaaaaa3d33db20d7c759dfc5f0669b /net/ipv6/anycast.c | |
parent | [IPV6] MROUTE: Use skb_tail_pointer(skb) instead of skb->tail. (diff) | |
parent | [IPV6] NDISC: Don't rely on node-type hint from L2 unless required. (diff) | |
download | linux-8eefca4888c986d993b2571eb31f0397a5d0a178.tar.xz linux-8eefca4888c986d993b2571eb31f0397a5d0a178.zip |
Merge branch 'net-2.6.26-isatap-20080403' of git://git.linux-ipv6.org/gitroot/yoshfuji/linux-2.6-dev
Diffstat (limited to 'net/ipv6/anycast.c')
-rw-r--r-- | net/ipv6/anycast.c | 25 |
1 files changed, 1 insertions, 24 deletions
diff --git a/net/ipv6/anycast.c b/net/ipv6/anycast.c index 463bd95d6b13..36e817492095 100644 --- a/net/ipv6/anycast.c +++ b/net/ipv6/anycast.c @@ -48,29 +48,6 @@ static int ipv6_dev_ac_dec(struct net_device *dev, struct in6_addr *addr); /* Big ac list lock for all the sockets */ static DEFINE_RWLOCK(ipv6_sk_ac_lock); -static int -ip6_onlink(struct in6_addr *addr, struct net_device *dev) -{ - struct inet6_dev *idev; - struct inet6_ifaddr *ifa; - int onlink; - - onlink = 0; - rcu_read_lock(); - idev = __in6_dev_get(dev); - if (idev) { - read_lock_bh(&idev->lock); - for (ifa=idev->addr_list; ifa; ifa=ifa->if_next) { - onlink = ipv6_prefix_equal(addr, &ifa->addr, - ifa->prefix_len); - if (onlink) - break; - } - read_unlock_bh(&idev->lock); - } - rcu_read_unlock(); - return onlink; -} /* * socket join an anycast group @@ -142,7 +119,7 @@ int ipv6_sock_ac_join(struct sock *sk, int ifindex, struct in6_addr *addr) * This obviates the need for propagating anycast routes while * still allowing some non-router anycast participation. */ - if (!ip6_onlink(addr, dev)) { + if (!ipv6_chk_prefix(addr, dev)) { if (ishost) err = -EADDRNOTAVAIL; if (err) |