]> err.no Git - linux-2.6/blobdiff - net/ipv6/route.c
ipv6: replace dst_metric() with dst_mtu() in net/ipv6/route.c.
[linux-2.6] / net / ipv6 / route.c
index cb8a51271b67bfdd20043fa7f6d007f104aab02c..5a3e87e4b18f003357720a7f79e3e6b665fb9055 100644 (file)
@@ -676,7 +676,7 @@ static struct rt6_info *ip6_pol_route(struct net *net, struct fib6_table *table,
        int strict = 0;
        int attempts = 3;
        int err;
-       int reachable = ipv6_devconf.forwarding ? 0 : RT6_LOOKUP_F_REACHABLE;
+       int reachable = net->ipv6.devconf_all->forwarding ? 0 : RT6_LOOKUP_F_REACHABLE;
 
        strict |= flags & RT6_LOOKUP_F_IFACE;
 
@@ -978,13 +978,12 @@ out:
        return &rt->u.dst;
 }
 
-int icmp6_dst_gc(int *more)
+int icmp6_dst_gc(void)
 {
        struct dst_entry *dst, *next, **pprev;
-       int freed;
+       int more = 0;
 
        next = NULL;
-       freed = 0;
 
        spin_lock_bh(&icmp6_dst_lock);
        pprev = &icmp6_dst_gc_list;
@@ -993,16 +992,15 @@ int icmp6_dst_gc(int *more)
                if (!atomic_read(&dst->__refcnt)) {
                        *pprev = dst->next;
                        dst_free(dst);
-                       freed++;
                } else {
                        pprev = &dst->next;
-                       (*more)++;
+                       ++more;
                }
        }
 
        spin_unlock_bh(&icmp6_dst_lock);
 
-       return freed;
+       return more;
 }
 
 static int ip6_dst_gc(struct dst_ops *ops)
@@ -1058,7 +1056,7 @@ int ip6_dst_hoplimit(struct dst_entry *dst)
                        hoplimit = idev->cnf.hop_limit;
                        in6_dev_put(idev);
                } else
-                       hoplimit = ipv6_devconf.hop_limit;
+                       hoplimit = dev_net(dev)->ipv6.devconf_all->hop_limit;
        }
        return hoplimit;
 }
@@ -1251,7 +1249,7 @@ install_route:
 
        if (dst_metric(&rt->u.dst, RTAX_HOPLIMIT) == 0)
                rt->u.dst.metrics[RTAX_HOPLIMIT-1] = -1;
-       if (!dst_metric(&rt->u.dst, RTAX_MTU))
+       if (!dst_mtu(&rt->u.dst))
                rt->u.dst.metrics[RTAX_MTU-1] = ipv6_get_mtu(dev);
        if (!dst_metric(&rt->u.dst, RTAX_ADVMSS))
                rt->u.dst.metrics[RTAX_ADVMSS-1] = ipv6_advmss(net, dst_mtu(&rt->u.dst));