diff options
Diffstat (limited to 'net/ipv4/fib_trie.c')
-rw-r--r-- | net/ipv4/fib_trie.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/net/ipv4/fib_trie.c b/net/ipv4/fib_trie.c index ea294fffb9ce..4b02d14e7ab9 100644 --- a/net/ipv4/fib_trie.c +++ b/net/ipv4/fib_trie.c | |||
@@ -2602,15 +2602,16 @@ static int fib_route_seq_show(struct seq_file *seq, void *v) | |||
2602 | list_for_each_entry_rcu(fa, &li->falh, fa_list) { | 2602 | list_for_each_entry_rcu(fa, &li->falh, fa_list) { |
2603 | const struct fib_info *fi = fa->fa_info; | 2603 | const struct fib_info *fi = fa->fa_info; |
2604 | unsigned flags = fib_flag_trans(fa->fa_type, mask, fi); | 2604 | unsigned flags = fib_flag_trans(fa->fa_type, mask, fi); |
2605 | char bf[128]; | 2605 | int len; |
2606 | 2606 | ||
2607 | if (fa->fa_type == RTN_BROADCAST | 2607 | if (fa->fa_type == RTN_BROADCAST |
2608 | || fa->fa_type == RTN_MULTICAST) | 2608 | || fa->fa_type == RTN_MULTICAST) |
2609 | continue; | 2609 | continue; |
2610 | 2610 | ||
2611 | if (fi) | 2611 | if (fi) |
2612 | snprintf(bf, sizeof(bf), | 2612 | seq_printf(seq, |
2613 | "%s\t%08X\t%08X\t%04X\t%d\t%u\t%d\t%08X\t%d\t%u\t%u", | 2613 | "%s\t%08X\t%08X\t%04X\t%d\t%u\t" |
2614 | "%d\t%08X\t%d\t%u\t%u%n", | ||
2614 | fi->fib_dev ? fi->fib_dev->name : "*", | 2615 | fi->fib_dev ? fi->fib_dev->name : "*", |
2615 | prefix, | 2616 | prefix, |
2616 | fi->fib_nh->nh_gw, flags, 0, 0, | 2617 | fi->fib_nh->nh_gw, flags, 0, 0, |
@@ -2619,14 +2620,15 @@ static int fib_route_seq_show(struct seq_file *seq, void *v) | |||
2619 | (fi->fib_advmss ? | 2620 | (fi->fib_advmss ? |
2620 | fi->fib_advmss + 40 : 0), | 2621 | fi->fib_advmss + 40 : 0), |
2621 | fi->fib_window, | 2622 | fi->fib_window, |
2622 | fi->fib_rtt >> 3); | 2623 | fi->fib_rtt >> 3, &len); |
2623 | else | 2624 | else |
2624 | snprintf(bf, sizeof(bf), | 2625 | seq_printf(seq, |
2625 | "*\t%08X\t%08X\t%04X\t%d\t%u\t%d\t%08X\t%d\t%u\t%u", | 2626 | "*\t%08X\t%08X\t%04X\t%d\t%u\t" |
2627 | "%d\t%08X\t%d\t%u\t%u%n", | ||
2626 | prefix, 0, flags, 0, 0, 0, | 2628 | prefix, 0, flags, 0, 0, 0, |
2627 | mask, 0, 0, 0); | 2629 | mask, 0, 0, 0, &len); |
2628 | 2630 | ||
2629 | seq_printf(seq, "%-127s\n", bf); | 2631 | seq_printf(seq, "%*s\n", 127 - len, ""); |
2630 | } | 2632 | } |
2631 | } | 2633 | } |
2632 | 2634 | ||