diff options
author | Denis V. Lunev <den@openvz.org> | 2008-01-10 06:24:11 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 18:01:27 -0500 |
commit | 8ad4942cd5bdad4143f7aa1d1bd4f7b2526c19c5 (patch) | |
tree | 9fc1c79ae579e20063d577912ad4aeb1aef3ba6d /net/ipv4/fib_trie.c | |
parent | 93456b6d7753def8760b423ac6b986eb9d5a4a95 (diff) |
[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 <benjamin.thery@bull.net>
Acked-by: Daniel Lezcano <dlezcano@fr.ibm.com>
Signed-off-by: Denis V. Lunev <den@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/fib_trie.c')
-rw-r--r-- | net/ipv4/fib_trie.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/net/ipv4/fib_trie.c b/net/ipv4/fib_trie.c index 92b687e6a472..fc0624e6a649 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) | |||
2167 | struct fib_table *tb; | 2167 | struct fib_table *tb; |
2168 | 2168 | ||
2169 | trie_local = NULL; | 2169 | trie_local = NULL; |
2170 | tb = fib_get_table(RT_TABLE_LOCAL); | 2170 | tb = fib_get_table(&init_net, RT_TABLE_LOCAL); |
2171 | if (tb) | 2171 | if (tb) |
2172 | trie_local = (struct trie *) tb->tb_data; | 2172 | trie_local = (struct trie *) tb->tb_data; |
2173 | 2173 | ||
2174 | trie_main = NULL; | 2174 | trie_main = NULL; |
2175 | tb = fib_get_table(RT_TABLE_MAIN); | 2175 | tb = fib_get_table(&init_net, RT_TABLE_MAIN); |
2176 | if (tb) | 2176 | if (tb) |
2177 | trie_main = (struct trie *) tb->tb_data; | 2177 | trie_main = (struct trie *) tb->tb_data; |
2178 | 2178 | ||
@@ -2239,12 +2239,12 @@ static void *fib_trie_seq_start(struct seq_file *seq, loff_t *pos) | |||
2239 | struct fib_table *tb; | 2239 | struct fib_table *tb; |
2240 | 2240 | ||
2241 | if (!iter->trie_local) { | 2241 | if (!iter->trie_local) { |
2242 | tb = fib_get_table(RT_TABLE_LOCAL); | 2242 | tb = fib_get_table(&init_net, RT_TABLE_LOCAL); |
2243 | if (tb) | 2243 | if (tb) |
2244 | iter->trie_local = (struct trie *) tb->tb_data; | 2244 | iter->trie_local = (struct trie *) tb->tb_data; |
2245 | } | 2245 | } |
2246 | if (!iter->trie_main) { | 2246 | if (!iter->trie_main) { |
2247 | tb = fib_get_table(RT_TABLE_MAIN); | 2247 | tb = fib_get_table(&init_net, RT_TABLE_MAIN); |
2248 | if (tb) | 2248 | if (tb) |
2249 | iter->trie_main = (struct trie *) tb->tb_data; | 2249 | iter->trie_main = (struct trie *) tb->tb_data; |
2250 | } | 2250 | } |