Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
[linux-2.6-microblaze.git] / net / ipv4 / route.c
index a6f20ee..1e3b187 100644 (file)
@@ -276,12 +276,13 @@ static int rt_cpu_seq_show(struct seq_file *seq, void *v)
        struct rt_cache_stat *st = v;
 
        if (v == SEQ_START_TOKEN) {
-               seq_printf(seq, "entries  in_hit in_slow_tot in_slow_mc in_no_route in_brd in_martian_dst in_martian_src  out_hit out_slow_tot out_slow_mc  gc_total gc_ignored gc_goal_miss gc_dst_overflow in_hlist_search out_hlist_search\n");
+               seq_puts(seq, "entries  in_hit   in_slow_tot in_slow_mc in_no_route in_brd   in_martian_dst in_martian_src out_hit  out_slow_tot out_slow_mc gc_total gc_ignored gc_goal_miss gc_dst_overflow in_hlist_search out_hlist_search\n");
                return 0;
        }
 
-       seq_printf(seq,"%08x  %08x %08x %08x %08x %08x %08x %08x "
-                  " %08x %08x %08x %08x %08x %08x %08x %08x %08x \n",
+       seq_printf(seq, "%08x %08x %08x    %08x   %08x    %08x %08x       "
+                       "%08x       %08x %08x     %08x    %08x %08x   "
+                       "%08x     %08x        %08x        %08x\n",
                   dst_entries_get_slow(&ipv4_dst_ops),
                   0, /* st->in_hit */
                   st->in_slow_tot,
@@ -1299,26 +1300,7 @@ static unsigned int ipv4_default_advmss(const struct dst_entry *dst)
 
 INDIRECT_CALLABLE_SCOPE unsigned int ipv4_mtu(const struct dst_entry *dst)
 {
-       const struct rtable *rt = (const struct rtable *)dst;
-       unsigned int mtu = rt->rt_pmtu;
-
-       if (!mtu || time_after_eq(jiffies, rt->dst.expires))
-               mtu = dst_metric_raw(dst, RTAX_MTU);
-
-       if (mtu)
-               goto out;
-
-       mtu = READ_ONCE(dst->dev->mtu);
-
-       if (unlikely(ip_mtu_locked(dst))) {
-               if (rt->rt_uses_gateway && mtu > 576)
-                       mtu = 576;
-       }
-
-out:
-       mtu = min_t(unsigned int, mtu, IP_MAX_MTU);
-
-       return mtu - lwtunnel_headroom(dst->lwtstate, mtu);
+       return ip_dst_mtu_maybe_forward(dst, false);
 }
 EXPORT_INDIRECT_CALLABLE(ipv4_mtu);
 
@@ -2831,8 +2813,7 @@ struct dst_entry *ipv4_blackhole_route(struct net *net, struct dst_entry *dst_or
                new->output = dst_discard_out;
 
                new->dev = net->loopback_dev;
-               if (new->dev)
-                       dev_hold(new->dev);
+               dev_hold(new->dev);
 
                rt->rt_is_input = ort->rt_is_input;
                rt->rt_iif = ort->rt_iif;