diff options
author | Denis V. Lunev <den@openvz.org> | 2008-01-23 01:04:30 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 18:11:04 -0500 |
commit | 1ab352768fc73838b062776ca5d1add3876a019f (patch) | |
tree | b30bd7744e30e90b6db01b71a5c8b86140538255 /net/ipv4/fib_frontend.c | |
parent | 010278ec4cdf404aefc0bbd5e7406674fec95286 (diff) |
[NETNS]: Add namespace parameter to ip_dev_find.
in_dev_find() need a namespace to pass it to fib_get_table(), so add
an argument.
Signed-off-by: Denis V. Lunev <den@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/fib_frontend.c')
-rw-r--r-- | net/ipv4/fib_frontend.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/ipv4/fib_frontend.c b/net/ipv4/fib_frontend.c index 7e3e7329dacf..d28261826bc2 100644 --- a/net/ipv4/fib_frontend.c +++ b/net/ipv4/fib_frontend.c | |||
@@ -153,7 +153,7 @@ static void fib_flush(struct net *net) | |||
153 | * Find the first device with a given source address. | 153 | * Find the first device with a given source address. |
154 | */ | 154 | */ |
155 | 155 | ||
156 | struct net_device * ip_dev_find(__be32 addr) | 156 | struct net_device * ip_dev_find(struct net *net, __be32 addr) |
157 | { | 157 | { |
158 | struct flowi fl = { .nl_u = { .ip4_u = { .daddr = addr } } }; | 158 | struct flowi fl = { .nl_u = { .ip4_u = { .daddr = addr } } }; |
159 | struct fib_result res; | 159 | struct fib_result res; |
@@ -164,7 +164,7 @@ struct net_device * ip_dev_find(__be32 addr) | |||
164 | res.r = NULL; | 164 | res.r = NULL; |
165 | #endif | 165 | #endif |
166 | 166 | ||
167 | local_table = fib_get_table(&init_net, RT_TABLE_LOCAL); | 167 | local_table = fib_get_table(net, RT_TABLE_LOCAL); |
168 | if (!local_table || local_table->tb_lookup(local_table, &fl, &res)) | 168 | if (!local_table || local_table->tb_lookup(local_table, &fl, &res)) |
169 | return NULL; | 169 | return NULL; |
170 | if (res.type != RTN_LOCAL) | 170 | if (res.type != RTN_LOCAL) |