David Miller writes: > > Yes the case when the trie is just a single leaf got wrong with the > > iterator and your patchs cures it. I think we have a similar problem > > with /proc/net/fib_trie > > I'm happy to review a fix for that :-) 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.
Cheers. --ro Signed-off-by: Robert Olsson <[EMAIL PROTECTED]> --- net-2.6.20/net/ipv4/fib_trie.c.orig 2007-01-26 13:18:13.000000000 +0100 +++ net-2.6.20/net/ipv4/fib_trie.c 2007-01-26 13:19:36.000000000 +0100 @@ -2290,16 +2290,17 @@ 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 netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html