diff options
author | Eric W. Biederman <ebiederm@xmission.com> | 2007-12-07 03:46:11 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 17:56:49 -0500 |
commit | bb803175865dd030420eebbc87298414c7725019 (patch) | |
tree | 7419c6c86b91c3543f7cafe0bdd33abd9bb98281 | |
parent | f845ab6b7dd872d027c27146c264e46bc16c656a (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>
-rw-r--r-- | include/net/ip_fib.h | 3 | ||||
-rw-r--r-- | net/ipv4/fib_hash.c | 5 |
2 files changed, 3 insertions, 5 deletions
diff --git a/include/net/ip_fib.h b/include/net/ip_fib.h index ed514bfb61ba..690fb4dd7505 100644 --- a/include/net/ip_fib.h +++ b/include/net/ip_fib.h | |||
@@ -191,9 +191,6 @@ extern void __init fib4_rules_init(void); | |||
191 | extern u32 fib_rules_tclass(struct fib_result *res); | 191 | extern u32 fib_rules_tclass(struct fib_result *res); |
192 | #endif | 192 | #endif |
193 | 193 | ||
194 | #define ip_fib_local_table fib_get_table(RT_TABLE_LOCAL) | ||
195 | #define ip_fib_main_table fib_get_table(RT_TABLE_MAIN) | ||
196 | |||
197 | extern int fib_lookup(struct flowi *flp, struct fib_result *res); | 194 | extern int fib_lookup(struct flowi *flp, struct fib_result *res); |
198 | 195 | ||
199 | extern struct fib_table *fib_new_table(u32 id); | 196 | extern struct fib_table *fib_new_table(u32 id); |
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 { | |||
811 | static struct fib_alias *fib_get_first(struct seq_file *seq) | 811 | static struct fib_alias *fib_get_first(struct seq_file *seq) |
812 | { | 812 | { |
813 | struct fib_iter_state *iter = seq->private; | 813 | struct fib_iter_state *iter = seq->private; |
814 | struct fn_hash *table = (struct fn_hash *) ip_fib_main_table->tb_data; | 814 | struct fib_table *main_table = fib_get_table(RT_TABLE_MAIN); |
815 | struct fn_hash *table = (struct fn_hash *)main_table->tb_data; | ||
815 | 816 | ||
816 | iter->bucket = 0; | 817 | iter->bucket = 0; |
817 | iter->hash_head = NULL; | 818 | iter->hash_head = NULL; |
@@ -950,7 +951,7 @@ static void *fib_seq_start(struct seq_file *seq, loff_t *pos) | |||
950 | void *v = NULL; | 951 | void *v = NULL; |
951 | 952 | ||
952 | read_lock(&fib_hash_lock); | 953 | read_lock(&fib_hash_lock); |
953 | if (ip_fib_main_table) | 954 | if (fib_get_table(RT_TABLE_MAIN)) |
954 | v = *pos ? fib_get_idx(seq, *pos - 1) : SEQ_START_TOKEN; | 955 | v = *pos ? fib_get_idx(seq, *pos - 1) : SEQ_START_TOKEN; |
955 | return v; | 956 | return v; |
956 | } | 957 | } |