Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=095b8501e4168ae5a879fcb9420ac48cbd43f95a
Commit:     095b8501e4168ae5a879fcb9420ac48cbd43f95a
Parent:     342a0cff0ad5fba6b591cfa37db3c65c4d9913f8
Author:     Robert Olsson <[EMAIL PROTECTED]>
AuthorDate: Fri Jan 26 19:06:01 2007 -0800
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Fri Jan 26 19:06:01 2007 -0800

    [IPV4]: Fix single-entry /proc/net/fib_trie output.
    
    When main table is just a single leaf this gets printed as belonging to the
    local table in /proc/net/fib_trie. A fix is below.
    
    Signed-off-by: Robert Olsson <[EMAIL PROTECTED]>
    Acked-by: Eric W. Biederman <[EMAIL PROTECTED]>
    Signed-off-by: David S. Miller <[EMAIL PROTECTED]>
---
 net/ipv4/fib_trie.c |   13 +++++++------
 1 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/net/ipv4/fib_trie.c b/net/ipv4/fib_trie.c
index 13307c0..1e589b9 100644
--- a/net/ipv4/fib_trie.c
+++ b/net/ipv4/fib_trie.c
@@ -2290,16 +2290,17 @@ static int fib_trie_seq_show(struct seq_file *seq, void 
*v)
        if (v == SEQ_START_TOKEN)
                return 0;
 
+       if (!NODE_PARENT(n)) {
+               if (iter->trie == trie_local)
+                       seq_puts(seq, "<local>:\n");
+               else
+                       seq_puts(seq, "<main>:\n");
+       }
+
        if (IS_TNODE(n)) {
                struct tnode *tn = (struct tnode *) n;
                __be32 prf = htonl(MASK_PFX(tn->key, tn->pos));
 
-               if (!NODE_PARENT(n)) {
-                       if (iter->trie == trie_local)
-                               seq_puts(seq, "<local>:\n");
-                       else
-                               seq_puts(seq, "<main>:\n");
-               } 
                seq_indent(seq, iter->depth-1);
                seq_printf(seq, "  +-- %d.%d.%d.%d/%d %d %d %d\n",
                           NIPQUAD(prf), tn->pos, tn->bits, tn->full_children, 
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to