]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - net/ipv6/route.c
ipv6: move ip6_dst_hoplimit() into core kernel
[karo-tx-linux.git] / net / ipv6 / route.c
index 8d9a93ed9c5926924b809b5bb68b267c07f3ca61..b770085ae36d167af19dffcafe8e504c13031659 100644 (file)
@@ -283,9 +283,8 @@ static inline struct rt6_info *ip6_dst_alloc(struct net *net,
 
                memset(dst + 1, 0, sizeof(*rt) - sizeof(*dst));
                rt6_init_peer(rt, table ? &table->tb6_peers : net->ipv6.peers);
-               rt->rt6i_genid = rt_genid(net);
+               rt->rt6i_genid = rt_genid_ipv6(net);
                INIT_LIST_HEAD(&rt->rt6i_siblings);
-               rt->rt6i_nsiblings = 0;
        }
        return rt;
 }
@@ -1062,7 +1061,7 @@ static struct dst_entry *ip6_dst_check(struct dst_entry *dst, u32 cookie)
         * DST_OBSOLETE_FORCE_CHK which forces validation calls down
         * into this function always.
         */
-       if (rt->rt6i_genid != rt_genid(dev_net(rt->dst.dev)))
+       if (rt->rt6i_genid != rt_genid_ipv6(dev_net(rt->dst.dev)))
                return NULL;
 
        if (rt->rt6i_node && (rt->rt6i_node->fn_sernum == cookie))
@@ -1355,25 +1354,6 @@ out:
        return entries > rt_max_size;
 }
 
-int ip6_dst_hoplimit(struct dst_entry *dst)
-{
-       int hoplimit = dst_metric_raw(dst, RTAX_HOPLIMIT);
-       if (hoplimit == 0) {
-               struct net_device *dev = dst->dev;
-               struct inet6_dev *idev;
-
-               rcu_read_lock();
-               idev = __in6_dev_get(dev);
-               if (idev)
-                       hoplimit = idev->cnf.hop_limit;
-               else
-                       hoplimit = dev_net(dev)->ipv6.devconf_all->hop_limit;
-               rcu_read_unlock();
-       }
-       return hoplimit;
-}
-EXPORT_SYMBOL(ip6_dst_hoplimit);
-
 /*
  *
  */