diff options
author | Denis V. Lunev <den@openvz.org> | 2008-01-10 06:28:24 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 18:01:31 -0500 |
commit | e4aef8aea31e6fc61b33a57120968a6e9824d138 (patch) | |
tree | 1d00d8b59e40336ff096311480cc703aab9dc5c1 /include | |
parent | e4e4971c5f8b70daccdd401132a81b723dc8337e (diff) |
[NETNS]: Place fib tables into netns.
The preparatory work has been done. All we need is to substitute
fib_table_hash with net->ipv4.fib_table_hash. Netns context is
available when required.
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 'include')
-rw-r--r-- | include/net/ip_fib.h | 6 | ||||
-rw-r--r-- | include/net/netns/ipv4.h | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/include/net/ip_fib.h b/include/net/ip_fib.h index dfb95d732aa5..025b225181e1 100644 --- a/include/net/ip_fib.h +++ b/include/net/ip_fib.h | |||
@@ -120,8 +120,6 @@ struct fib_result_nl { | |||
120 | int err; | 120 | int err; |
121 | }; | 121 | }; |
122 | 122 | ||
123 | extern struct hlist_head fib_table_hash[]; | ||
124 | |||
125 | #ifdef CONFIG_IP_ROUTE_MULTIPATH | 123 | #ifdef CONFIG_IP_ROUTE_MULTIPATH |
126 | 124 | ||
127 | #define FIB_RES_NH(res) ((res).fi->fib_nh[(res).nh_sel]) | 125 | #define FIB_RES_NH(res) ((res).fi->fib_nh[(res).nh_sel]) |
@@ -170,8 +168,8 @@ static inline struct fib_table *fib_get_table(struct net *net, u32 id) | |||
170 | struct hlist_head *ptr; | 168 | struct hlist_head *ptr; |
171 | 169 | ||
172 | ptr = id == RT_TABLE_LOCAL ? | 170 | ptr = id == RT_TABLE_LOCAL ? |
173 | &fib_table_hash[TABLE_LOCAL_INDEX] : | 171 | &net->ipv4.fib_table_hash[TABLE_LOCAL_INDEX] : |
174 | &fib_table_hash[TABLE_MAIN_INDEX]; | 172 | &net->ipv4.fib_table_hash[TABLE_MAIN_INDEX]; |
175 | return hlist_entry(ptr->first, struct fib_table, tb_hlist); | 173 | return hlist_entry(ptr->first, struct fib_table, tb_hlist); |
176 | } | 174 | } |
177 | 175 | ||
diff --git a/include/net/netns/ipv4.h b/include/net/netns/ipv4.h index a7bd5d83e43e..2dd31937d022 100644 --- a/include/net/netns/ipv4.h +++ b/include/net/netns/ipv4.h | |||
@@ -8,6 +8,7 @@ | |||
8 | struct ctl_table_header; | 8 | struct ctl_table_header; |
9 | struct ipv4_devconf; | 9 | struct ipv4_devconf; |
10 | struct fib_rules_ops; | 10 | struct fib_rules_ops; |
11 | struct hlist_head; | ||
11 | 12 | ||
12 | struct netns_ipv4 { | 13 | struct netns_ipv4 { |
13 | #ifdef CONFIG_SYSCTL | 14 | #ifdef CONFIG_SYSCTL |
@@ -18,5 +19,6 @@ struct netns_ipv4 { | |||
18 | #ifdef CONFIG_IP_MULTIPLE_TABLES | 19 | #ifdef CONFIG_IP_MULTIPLE_TABLES |
19 | struct fib_rules_ops *rules_ops; | 20 | struct fib_rules_ops *rules_ops; |
20 | #endif | 21 | #endif |
22 | struct hlist_head *fib_table_hash; | ||
21 | }; | 23 | }; |
22 | #endif | 24 | #endif |