aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2012-07-10 03:52:56 -0400
committerDavid S. Miller <davem@davemloft.net>2012-07-11 01:40:06 -0400
commit794785bf12d5d6ad7f557d78d203bb0bbfcd8da2 (patch)
treef3f869abc60b3bec84528bdf9a84d73824037dae
parent51c5d0c4b169bf762f09e0d5b283a7f0b2a45739 (diff)
net: Don't report route RTT metric value in cache dumps.
We don't maintain it dynamically any longer, so reporting it would be extremely misleading. Report zero instead. Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--net/decnet/dn_route.c11
-rw-r--r--net/ipv4/route.c22
2 files changed, 15 insertions, 18 deletions
diff --git a/net/decnet/dn_route.c b/net/decnet/dn_route.c
index 6e74b3f110bc..707027fae8ab 100644
--- a/net/decnet/dn_route.c
+++ b/net/decnet/dn_route.c
@@ -1812,12 +1812,11 @@ static int dn_rt_cache_seq_show(struct seq_file *seq, void *v)
1812 char buf1[DN_ASCBUF_LEN], buf2[DN_ASCBUF_LEN]; 1812 char buf1[DN_ASCBUF_LEN], buf2[DN_ASCBUF_LEN];
1813 1813
1814 seq_printf(seq, "%-8s %-7s %-7s %04d %04d %04d\n", 1814 seq_printf(seq, "%-8s %-7s %-7s %04d %04d %04d\n",
1815 rt->dst.dev ? rt->dst.dev->name : "*", 1815 rt->dst.dev ? rt->dst.dev->name : "*",
1816 dn_addr2asc(le16_to_cpu(rt->rt_daddr), buf1), 1816 dn_addr2asc(le16_to_cpu(rt->rt_daddr), buf1),
1817 dn_addr2asc(le16_to_cpu(rt->rt_saddr), buf2), 1817 dn_addr2asc(le16_to_cpu(rt->rt_saddr), buf2),
1818 atomic_read(&rt->dst.__refcnt), 1818 atomic_read(&rt->dst.__refcnt),
1819 rt->dst.__use, 1819 rt->dst.__use, 0);
1820 (int) dst_metric(&rt->dst, RTAX_RTT));
1821 return 0; 1820 return 0;
1822} 1821}
1823 1822
diff --git a/net/ipv4/route.c b/net/ipv4/route.c
index 72e88c208025..d02c91177d32 100644
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -423,18 +423,16 @@ static int rt_cache_seq_show(struct seq_file *seq, void *v)
423 int len; 423 int len;
424 424
425 seq_printf(seq, "%s\t%08X\t%08X\t%8X\t%d\t%u\t%d\t" 425 seq_printf(seq, "%s\t%08X\t%08X\t%8X\t%d\t%u\t%d\t"
426 "%08X\t%d\t%u\t%u\t%02X\t%d\t%1d\t%08X%n", 426 "%08X\t%d\t%u\t%u\t%02X\t%d\t%1d\t%08X%n",
427 r->dst.dev ? r->dst.dev->name : "*", 427 r->dst.dev ? r->dst.dev->name : "*",
428 (__force u32)r->rt_dst, 428 (__force u32)r->rt_dst,
429 (__force u32)r->rt_gateway, 429 (__force u32)r->rt_gateway,
430 r->rt_flags, atomic_read(&r->dst.__refcnt), 430 r->rt_flags, atomic_read(&r->dst.__refcnt),
431 r->dst.__use, 0, (__force u32)r->rt_src, 431 r->dst.__use, 0, (__force u32)r->rt_src,
432 dst_metric_advmss(&r->dst) + 40, 432 dst_metric_advmss(&r->dst) + 40,
433 dst_metric(&r->dst, RTAX_WINDOW), 433 dst_metric(&r->dst, RTAX_WINDOW), 0,
434 (int)((dst_metric(&r->dst, RTAX_RTT) >> 3) + 434 r->rt_key_tos,
435 dst_metric(&r->dst, RTAX_RTTVAR)), 435 -1, 0, 0, &len);
436 r->rt_key_tos,
437 -1, 0, 0, &len);
438 436
439 seq_printf(seq, "%*s\n", 127 - len, ""); 437 seq_printf(seq, "%*s\n", 127 - len, "");
440 } 438 }