[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 <xemul@openvz.org>
Acked-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Pavel Emelyanov
2008-04-16 00:55:06 -07:00
committed by David S. Miller
parent 7a17a2f79f
commit 65d292a2ef
3 changed files with 4 additions and 8 deletions

View File

@@ -153,9 +153,6 @@ int vlan_skb_recv(struct sk_buff *skb, struct net_device *dev,
struct net_device_stats *stats;
unsigned short vlan_TCI;
if (dev_net(dev) != &init_net)
goto err_free;
skb = skb_share_check(skb, GFP_ATOMIC);
if (skb == NULL)
goto err_free;