Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1946294AbXBCCoQ (ORCPT ); Fri, 2 Feb 2007 21:44:16 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1946289AbXBCCn4 (ORCPT ); Fri, 2 Feb 2007 21:43:56 -0500 Received: from 216-99-217-87.dsl.aracnet.com ([216.99.217.87]:53567 "EHLO sous-sol.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1946287AbXBCCnw (ORCPT ); Fri, 2 Feb 2007 21:43:52 -0500 Message-Id: <20070203024610.275987000@sous-sol.org> References: <20070203023504.435051000@sous-sol.org> User-Agent: quilt/0.45-1 Date: Fri, 02 Feb 2007 18:35:54 -0800 From: Chris Wright To: linux-kernel@vger.kernel.org, stable@kernel.org Cc: Justin Forbes , Zwane Mwaikambo , "Theodore Ts'o" , Randy Dunlap , Dave Jones , Chuck Wolber , Chris Wedgwood , Michael Krufky , torvalds@linux-foundation.org, akpm@linux-foundation.org, alan@lxorguk.ukuu.org.uk, David Miller , bunk@stusta.de, Robert Olsson , Eric W Biederman Subject: [patch 50/59] IPV4: Fix single-entry /proc/net/fib_trie output. Content-Disposition: inline; filename=ipv4-fix-single-entry-proc-net-fib_trie-output.patch Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1557 Lines: 49 -stable review patch. If anyone has any objections, please let us know. ------------------ From: Robert Olsson 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 Acked-by: Eric W. Biederman Signed-off-by: David S. Miller Signed-off-by: Chris Wright --- net/ipv4/fib_trie.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) --- linux-2.6.19.2.orig/net/ipv4/fib_trie.c +++ linux-2.6.19.2/net/ipv4/fib_trie.c @@ -2290,16 +2290,17 @@ static int fib_trie_seq_show(struct seq_ if (v == SEQ_START_TOKEN) return 0; + if (!NODE_PARENT(n)) { + if (iter->trie == trie_local) + seq_puts(seq, ":\n"); + else + seq_puts(seq, "
:\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, ":\n"); - else - seq_puts(seq, "
:\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 linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/