From 8ad4942cd5bdad4143f7aa1d1bd4f7b2526c19c5 Mon Sep 17 00:00:00 2001 From: "Denis V. Lunev" Date: Thu, 10 Jan 2008 03:24:11 -0800 Subject: [NETNS]: Add netns parameter to fib_get_table/fib_new_table. This patch extends the fib_get_table and the fib_new_table functions with the network namespace pointer. That will allow to access the table relatively from the network namespace. Acked-by: Benjamin Thery Acked-by: Daniel Lezcano Signed-off-by: Denis V. Lunev Signed-off-by: David S. Miller --- net/ipv4/fib_trie.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'net/ipv4/fib_trie.c') diff --git a/net/ipv4/fib_trie.c b/net/ipv4/fib_trie.c index 92b687e6a47..fc0624e6a64 100644 --- a/net/ipv4/fib_trie.c +++ b/net/ipv4/fib_trie.c @@ -2167,12 +2167,12 @@ static int fib_triestat_seq_show(struct seq_file *seq, void *v) struct fib_table *tb; trie_local = NULL; - tb = fib_get_table(RT_TABLE_LOCAL); + tb = fib_get_table(&init_net, RT_TABLE_LOCAL); if (tb) trie_local = (struct trie *) tb->tb_data; trie_main = NULL; - tb = fib_get_table(RT_TABLE_MAIN); + tb = fib_get_table(&init_net, RT_TABLE_MAIN); if (tb) trie_main = (struct trie *) tb->tb_data; @@ -2239,12 +2239,12 @@ static void *fib_trie_seq_start(struct seq_file *seq, loff_t *pos) struct fib_table *tb; if (!iter->trie_local) { - tb = fib_get_table(RT_TABLE_LOCAL); + tb = fib_get_table(&init_net, RT_TABLE_LOCAL); if (tb) iter->trie_local = (struct trie *) tb->tb_data; } if (!iter->trie_main) { - tb = fib_get_table(RT_TABLE_MAIN); + tb = fib_get_table(&init_net, RT_TABLE_MAIN); if (tb) iter->trie_main = (struct trie *) tb->tb_data; } -- cgit v1.2.3