summaryrefslogtreecommitdiff
path: root/net/ipv4/fib_hash.c
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2007-12-07 00:46:11 -0800
committerDavid S. Miller <davem@davemloft.net>2008-01-28 14:56:49 -0800
commitbb803175865dd030420eebbc87298414c7725019 (patch)
tree7419c6c86b91c3543f7cafe0bdd33abd9bb98281 /net/ipv4/fib_hash.c
parentf845ab6b7dd872d027c27146c264e46bc16c656a (diff)
[IPV4]: Remove ip_fib_local_table and ip_fib_main_table defines.
There are only 2 users and it doesn't hurt to call fib_get_table instead, and it makes it easier to make the fib network namespace aware. Signed-off-by: Eric W. Biederman <ebiederm@xmission.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.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/net/ipv4/fib_hash.c b/net/ipv4/fib_hash.c
index eb1aa8eead09..638185eb315f 100644
--- a/net/ipv4/fib_hash.c
+++ b/net/ipv4/fib_hash.c
@@ -811,7 +811,8 @@ struct fib_iter_state {
static struct fib_alias *fib_get_first(struct seq_file *seq)
{
struct fib_iter_state *iter = seq->private;
- struct fn_hash *table = (struct fn_hash *) ip_fib_main_table->tb_data;
+ struct fib_table *main_table = fib_get_table(RT_TABLE_MAIN);
+ struct fn_hash *table = (struct fn_hash *)main_table->tb_data;
iter->bucket = 0;
iter->hash_head = NULL;
@@ -950,7 +951,7 @@ static void *fib_seq_start(struct seq_file *seq, loff_t *pos)
void *v = NULL;
read_lock(&fib_hash_lock);
- if (ip_fib_main_table)
+ if (fib_get_table(RT_TABLE_MAIN))
v = *pos ? fib_get_idx(seq, *pos - 1) : SEQ_START_TOKEN;
return v;
}