From: Patrick McHardy Date: Mon, 21 Nov 2005 05:09:00 +0000 (-0800) Subject: [FIB_TRIE]: Don't show local table in /proc/net/route output X-Git-Tag: v2.6.15-rc3~132^2~5 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c9e53cbe7ad6eabb3c7c5140b6127b4e5f9ee840;p=linux-2.6 [FIB_TRIE]: Don't show local table in /proc/net/route output Don't show local table to behave similar to fib_hash. Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller --- diff --git a/net/ipv4/fib_trie.c b/net/ipv4/fib_trie.c index 66247f38b3..705e3ce86d 100644 --- a/net/ipv4/fib_trie.c +++ b/net/ipv4/fib_trie.c @@ -2378,6 +2378,7 @@ static unsigned fib_flag_trans(int type, u32 mask, const struct fib_info *fi) */ static int fib_route_seq_show(struct seq_file *seq, void *v) { + const struct fib_trie_iter *iter = seq->private; struct leaf *l = v; int i; char bf[128]; @@ -2389,6 +2390,8 @@ static int fib_route_seq_show(struct seq_file *seq, void *v) return 0; } + if (iter->trie == trie_local) + return 0; if (IS_TNODE(l)) return 0;