[NETNS]: Add netns parameter to inetdev_by_index.
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
da0e28cb68
commit
7fee0ca237
@@ -583,7 +583,7 @@ out:
|
||||
if (nh->nh_flags&(RTNH_F_PERVASIVE|RTNH_F_ONLINK))
|
||||
return -EINVAL;
|
||||
|
||||
in_dev = inetdev_by_index(nh->nh_oif);
|
||||
in_dev = inetdev_by_index(&init_net, nh->nh_oif);
|
||||
if (in_dev == NULL)
|
||||
return -ENODEV;
|
||||
if (!(in_dev->dev->flags&IFF_UP)) {
|
||||
|
Reference in New Issue
Block a user