ipv4: Enforce max MTU metric at route insertion time.
[deliverable/linux.git] / net / ipv4 / route.c
index 677d65253e4c601fa8a4f971d7eb57e1164e3e93..1678b575165b0cb199401558cab45321f17aafa5 100644 (file)
@@ -1763,21 +1763,16 @@ static void rt_set_nexthop(struct rtable *rt, const struct flowi4 *fl4,
                           const struct fib_result *res,
                           struct fib_info *fi, u16 type, u32 itag)
 {
-       struct dst_entry *dst = &rt->dst;
-
        if (fi) {
                if (FIB_RES_GW(*res) &&
                    FIB_RES_NH(*res).nh_scope == RT_SCOPE_LINK)
                        rt->rt_gateway = FIB_RES_GW(*res);
                rt_init_metrics(rt, fl4, fi);
 #ifdef CONFIG_IP_ROUTE_CLASSID
-               dst->tclassid = FIB_RES_NH(*res).nh_tclassid;
+               rt->dst.tclassid = FIB_RES_NH(*res).nh_tclassid;
 #endif
        }
 
-       if (dst_mtu(dst) > IP_MAX_MTU)
-               dst_metric_set(dst, RTAX_MTU, IP_MAX_MTU);
-
 #ifdef CONFIG_IP_ROUTE_CLASSID
 #ifdef CONFIG_IP_MULTIPLE_TABLES
        set_class_tag(rt, fib_rules_tclass(res));
This page took 0.02556 seconds and 5 git commands to generate.