[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>
This commit is contained in:
committed by
David S. Miller
parent
010278ec4c
commit
1ab352768f
@ -153,7 +153,7 @@ static void fib_flush(struct net *net)
|
||||
* Find the first device with a given source address.
|
||||
*/
|
||||
|
||||
struct net_device * ip_dev_find(__be32 addr)
|
||||
struct net_device * ip_dev_find(struct net *net, __be32 addr)
|
||||
{
|
||||
struct flowi fl = { .nl_u = { .ip4_u = { .daddr = addr } } };
|
||||
struct fib_result res;
|
||||
@ -164,7 +164,7 @@ struct net_device * ip_dev_find(__be32 addr)
|
||||
res.r = NULL;
|
||||
#endif
|
||||
|
||||
local_table = fib_get_table(&init_net, RT_TABLE_LOCAL);
|
||||
local_table = fib_get_table(net, RT_TABLE_LOCAL);
|
||||
if (!local_table || local_table->tb_lookup(local_table, &fl, &res))
|
||||
return NULL;
|
||||
if (res.type != RTN_LOCAL)
|
||||
|
Reference in New Issue
Block a user