aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/fib_trie.c
diff options
context:
space:
mode:
authorAlexander Duyck <alexander.h.duyck@redhat.com>2015-03-11 19:36:08 -0400
committerDavid S. Miller <davem@davemloft.net>2015-03-11 21:24:32 -0400
commit654eff45166c7e89d18fc476325c975768b2e347 (patch)
treeb5f355d84c286551bedf0551fd58e355f9180de9 /net/ipv4/fib_trie.c
parent388a83576aa1816184a1706753ffa308cce53c8d (diff)
fib_trie: Only display main table in /proc/net/route
When we merged the tries for local and main I had overlooked the iterator for /proc/net/route. As a result it was outputting both local and main when the two tries were merged. This patch resolves that by only providing output for aliases that are actually in the main trie. As a result we should go back to the original behavior which I assume will be necessary to maintain legacy support. Fixes: 0ddcf43d5 ("ipv4: FIB Local/MAIN table collapse") Signed-off-by: Alexander Duyck <alexander.h.duyck@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/fib_trie.c')
-rw-r--r--net/ipv4/fib_trie.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/net/ipv4/fib_trie.c b/net/ipv4/fib_trie.c
index 7b2badd74ad8..dd488c102d89 100644
--- a/net/ipv4/fib_trie.c
+++ b/net/ipv4/fib_trie.c
@@ -2539,6 +2539,8 @@ static unsigned int fib_flag_trans(int type, __be32 mask, const struct fib_info
2539 */ 2539 */
2540static int fib_route_seq_show(struct seq_file *seq, void *v) 2540static int fib_route_seq_show(struct seq_file *seq, void *v)
2541{ 2541{
2542 struct fib_route_iter *iter = seq->private;
2543 struct fib_table *tb = iter->main_tb;
2542 struct fib_alias *fa; 2544 struct fib_alias *fa;
2543 struct key_vector *l = v; 2545 struct key_vector *l = v;
2544 __be32 prefix; 2546 __be32 prefix;
@@ -2561,6 +2563,9 @@ static int fib_route_seq_show(struct seq_file *seq, void *v)
2561 (fa->fa_type == RTN_MULTICAST)) 2563 (fa->fa_type == RTN_MULTICAST))
2562 continue; 2564 continue;
2563 2565
2566 if (fa->tb_id != tb->tb_id)
2567 continue;
2568
2564 seq_setwidth(seq, 127); 2569 seq_setwidth(seq, 127);
2565 2570
2566 if (fi) 2571 if (fi)