Merge branch 'master' of git://1984.lsi.us.es/net-next-2.6
authorPatrick McHardy <kaber@trash.net>
Fri, 14 Jan 2011 13:12:37 +0000 (14:12 +0100)
committerPatrick McHardy <kaber@trash.net>
Fri, 14 Jan 2011 13:12:37 +0000 (14:12 +0100)
Conflicts:
net/ipv4/route.c

Signed-off-by: Patrick McHardy <kaber@trash.net>
1  2 
include/net/dst.h
net/ipv4/fib_semantics.c
net/ipv4/route.c

index 6baba836ad8b89f5af324427aac0dc577d7f7341,93b0310317bed44f54350aeecc9abf80141ca592..be5a0d4c491d98eb1c2123364a137c5c954a4152
@@@ -70,9 -70,9 +70,9 @@@ struct dst_entry 
  
        struct  dst_ops         *ops;
  
-       u32                     metrics[RTAX_MAX];
+       u32                     _metrics[RTAX_MAX];
  
 -#ifdef CONFIG_NET_CLS_ROUTE
 +#ifdef CONFIG_IP_ROUTE_CLASSID
        __u32                   tclassid;
  #else
        __u32                   __pad2;
Simple merge
index f70ae1bccb8a0938048ea8f64a859e5f1c72667e,351dc4e8524231ee907298ecc2a1cd6f3cf04e3d..3e5b7cc2db4fefbbfd682856588c8eb2fcc4ddc6
@@@ -1802,32 -1824,18 +1824,18 @@@ static void rt_set_nexthop(struct rtabl
                if (FIB_RES_GW(*res) &&
                    FIB_RES_NH(*res).nh_scope == RT_SCOPE_LINK)
                        rt->rt_gateway = FIB_RES_GW(*res);
-               memcpy(rt->dst.metrics, fi->fib_metrics,
-                      sizeof(rt->dst.metrics));
-               if (fi->fib_mtu == 0) {
-                       rt->dst.metrics[RTAX_MTU-1] = rt->dst.dev->mtu;
-                       if (dst_metric_locked(&rt->dst, RTAX_MTU) &&
-                           rt->rt_gateway != rt->rt_dst &&
-                           rt->dst.dev->mtu > 576)
-                               rt->dst.metrics[RTAX_MTU-1] = 576;
-               }
+               dst_import_metrics(dst, fi->fib_metrics);
 -#ifdef CONFIG_NET_CLS_ROUTE
 +#ifdef CONFIG_IP_ROUTE_CLASSID
-               rt->dst.tclassid = FIB_RES_NH(*res).nh_tclassid;
+               dst->tclassid = FIB_RES_NH(*res).nh_tclassid;
  #endif
-       } else
-               rt->dst.metrics[RTAX_MTU-1]= rt->dst.dev->mtu;
-       if (dst_metric(&rt->dst, RTAX_HOPLIMIT) == 0)
-               rt->dst.metrics[RTAX_HOPLIMIT-1] = sysctl_ip_default_ttl;
-       if (dst_mtu(&rt->dst) > IP_MAX_MTU)
-               rt->dst.metrics[RTAX_MTU-1] = IP_MAX_MTU;
-       if (dst_metric(&rt->dst, RTAX_ADVMSS) == 0)
-               rt->dst.metrics[RTAX_ADVMSS-1] = max_t(unsigned int, rt->dst.dev->mtu - 40,
-                                      ip_rt_min_advmss);
-       if (dst_metric(&rt->dst, RTAX_ADVMSS) > 65535 - 40)
-               rt->dst.metrics[RTAX_ADVMSS-1] = 65535 - 40;
+       }
+       if (dst_mtu(dst) > IP_MAX_MTU)
+               dst_metric_set(dst, RTAX_MTU, IP_MAX_MTU);
+       if (dst_metric_raw(dst, RTAX_ADVMSS) > 65535 - 40)
+               dst_metric_set(dst, RTAX_ADVMSS, 65535 - 40);
  
 -#ifdef CONFIG_NET_CLS_ROUTE
 +#ifdef CONFIG_IP_ROUTE_CLASSID
  #ifdef CONFIG_IP_MULTIPLE_TABLES
        set_class_tag(rt, fib_rules_tclass(res));
  #endif