[NETNS]: Add netns parameter to fib_lookup.
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
ba93ef7465
commit
da0e28cb68
@@ -241,7 +241,7 @@ int fib_validate_source(__be32 src, __be32 dst, u8 tos, int oif,
|
||||
if (in_dev == NULL)
|
||||
goto e_inval;
|
||||
|
||||
if (fib_lookup(&fl, &res))
|
||||
if (fib_lookup(&init_net, &fl, &res))
|
||||
goto last_resort;
|
||||
if (res.type != RTN_UNICAST)
|
||||
goto e_inval_res;
|
||||
@@ -265,7 +265,7 @@ int fib_validate_source(__be32 src, __be32 dst, u8 tos, int oif,
|
||||
fl.oif = dev->ifindex;
|
||||
|
||||
ret = 0;
|
||||
if (fib_lookup(&fl, &res) == 0) {
|
||||
if (fib_lookup(&init_net, &fl, &res) == 0) {
|
||||
if (res.type == RTN_UNICAST) {
|
||||
*spec_dst = FIB_RES_PREFSRC(res);
|
||||
ret = FIB_RES_NH(res).nh_scope >= RT_SCOPE_HOST;
|
||||
|
Reference in New Issue
Block a user