]> Pileus Git - ~andy/linux/blobdiff - net/ipv6/sit.c
[IPV6]: Use ipv6_addr_equal() instead of !ipv6_addr_cmp().
[~andy/linux] / net / ipv6 / sit.c
index 08a483a8de5083dda156e24b64c6f1805cf980f6..91e46fbe6ce2e0ec0722ad2af6a91858721dd15b 100644 (file)
@@ -344,31 +344,6 @@ out:
        return 0;
 }
 
-/* copied directly from anycast.c */
-static int
-ipip6_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;
-}
-
 static int
 isatap_chksrc(struct sk_buff *skb, struct iphdr *iph, struct ip_tunnel *t)
 {
@@ -386,7 +361,7 @@ isatap_chksrc(struct sk_buff *skb, struct iphdr *iph, struct ip_tunnel *t)
                struct in6_addr *addr6 = &ipv6_hdr(skb)->saddr;
                if (ipv6_addr_is_isatap(addr6) &&
                    (addr6->s6_addr32[3] == iph->saddr) &&
-                   ipip6_onlink(addr6, t->dev))
+                   ipv6_chk_prefix(addr6, t->dev))
                        skb->ndisc_nodetype = NDISC_NODETYPE_HOST;
                else
                        ok = 0;
@@ -404,7 +379,7 @@ static void ipip6_tunnel_uninit(struct net_device *dev)
                dev_put(dev);
        } else {
                ipip6_tunnel_unlink(netdev_priv(dev));
-               ipip6_tunnel_del_prl(netdev_priv(dev), 0);
+               ipip6_tunnel_del_prl(netdev_priv(dev), NULL);
                dev_put(dev);
        }
 }