Commit c4544c72 authored by Denis V. Lunev's avatar Denis V. Lunev Committed by David S. Miller
Browse files

[NETNS]: Process inet_select_addr inside a namespace.

The context is available from a network device passed in.
Signed-off-by: default avatarDenis V. Lunev <>
Signed-off-by: default avatarDavid S. Miller <>
parent 3776c889
......@@ -872,6 +872,7 @@ __be32 inet_select_addr(const struct net_device *dev, __be32 dst, int scope)
__be32 addr = 0;
struct in_device *in_dev;
struct net *net = dev->nd_net;
in_dev = __in_dev_get_rcu(dev);
......@@ -900,7 +901,7 @@ no_in_dev:
for_each_netdev(&init_net, dev) {
for_each_netdev(net, dev) {
if ((in_dev = __in_dev_get_rcu(dev)) == NULL)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment