Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

[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 <robert.olsson@its.uu.se>
Acked-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Robert Olsson and committed by
David S. Miller
095b8501 342a0cff

+7 -6
+7 -6
net/ipv4/fib_trie.c
··· 2290 2290 if (v == SEQ_START_TOKEN) 2291 2291 return 0; 2292 2292 2293 + if (!NODE_PARENT(n)) { 2294 + if (iter->trie == trie_local) 2295 + seq_puts(seq, "<local>:\n"); 2296 + else 2297 + seq_puts(seq, "<main>:\n"); 2298 + } 2299 + 2293 2300 if (IS_TNODE(n)) { 2294 2301 struct tnode *tn = (struct tnode *) n; 2295 2302 __be32 prf = htonl(MASK_PFX(tn->key, tn->pos)); 2296 2303 2297 - if (!NODE_PARENT(n)) { 2298 - if (iter->trie == trie_local) 2299 - seq_puts(seq, "<local>:\n"); 2300 - else 2301 - seq_puts(seq, "<main>:\n"); 2302 - } 2303 2304 seq_indent(seq, iter->depth-1); 2304 2305 seq_printf(seq, " +-- %d.%d.%d.%d/%d %d %d %d\n", 2305 2306 NIPQUAD(prf), tn->pos, tn->bits, tn->full_children,