aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/fib_hash.c
diff options
context:
space:
mode:
authorDenis V. Lunev <den@openvz.org>2008-01-10 06:24:11 -0500
committerDavid S. Miller <davem@davemloft.net>2008-01-28 18:01:27 -0500
commit8ad4942cd5bdad4143f7aa1d1bd4f7b2526c19c5 (patch)
tree9fc1c79ae579e20063d577912ad4aeb1aef3ba6d /net/ipv4/fib_hash.c
parent93456b6d7753def8760b423ac6b986eb9d5a4a95 (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_hash.c')
-rw-r--r--net/ipv4/fib_hash.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/ipv4/fib_hash.c b/net/ipv4/fib_hash.c
index 694a072d8090..d20ae2e28ab5 100644
--- a/net/ipv4/fib_hash.c
+++ b/net/ipv4/fib_hash.c
@@ -796,7 +796,7 @@ struct fib_iter_state {
796static struct fib_alias *fib_get_first(struct seq_file *seq) 796static struct fib_alias *fib_get_first(struct seq_file *seq)
797{ 797{
798 struct fib_iter_state *iter = seq->private; 798 struct fib_iter_state *iter = seq->private;
799 struct fib_table *main_table = fib_get_table(RT_TABLE_MAIN); 799 struct fib_table *main_table = fib_get_table(&init_net, RT_TABLE_MAIN);
800 struct fn_hash *table = (struct fn_hash *)main_table->tb_data; 800 struct fn_hash *table = (struct fn_hash *)main_table->tb_data;
801 801
802 iter->bucket = 0; 802 iter->bucket = 0;
@@ -937,7 +937,7 @@ static void *fib_seq_start(struct seq_file *seq, loff_t *pos)
937 void *v = NULL; 937 void *v = NULL;
938 938
939 read_lock(&fib_hash_lock); 939 read_lock(&fib_hash_lock);
940 if (fib_get_table(RT_TABLE_MAIN)) 940 if (fib_get_table(&init_net, RT_TABLE_MAIN))
941 v = *pos ? fib_get_idx(seq, *pos - 1) : SEQ_START_TOKEN; 941 v = *pos ? fib_get_idx(seq, *pos - 1) : SEQ_START_TOKEN;
942 return v; 942 return v;
943} 943}