From 65d292a2ef2df66fd1ab83447afee71ef3720ded Mon Sep 17 00:00:00 2001 From: Pavel Emelyanov Date: Wed, 16 Apr 2008 00:55:06 -0700 Subject: [VLAN]: Allow vlan devices registration in net namespaces. This one is similar to what I've done for TUN - set the proper net after device allocation and clean VLANs on net exit (use the rtnl_kill_links helper finally). Plus, drop explicit init_net usage and net != &init_net checks. Signed-off-by: Pavel Emelyanov Acked-by: Patrick McHardy Signed-off-by: David S. Miller --- net/8021q/vlan_netlink.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'net/8021q/vlan_netlink.c') diff --git a/net/8021q/vlan_netlink.c b/net/8021q/vlan_netlink.c index e32eeb37987e..c93e69ec28ed 100644 --- a/net/8021q/vlan_netlink.c +++ b/net/8021q/vlan_netlink.c @@ -113,7 +113,7 @@ static int vlan_newlink(struct net_device *dev, if (!tb[IFLA_LINK]) return -EINVAL; - real_dev = __dev_get_by_index(&init_net, nla_get_u32(tb[IFLA_LINK])); + real_dev = __dev_get_by_index(dev_net(dev), nla_get_u32(tb[IFLA_LINK])); if (!real_dev) return -ENODEV; -- cgit v1.2.3-59-g8ed1b