Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 90753
b: refs/heads/master
c: 65d292a
h: refs/heads/master
i:
  90751: c54b5a1
v: v3
  • Loading branch information
Pavel Emelyanov authored and David S. Miller committed Apr 16, 2008
1 parent eef4ce3 commit ad780f2
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7a17a2f79f54a988d08ffa33ec9e1038bffec42b
refs/heads/master: 65d292a2ef2df66fd1ab83447afee71ef3720ded
7 changes: 3 additions & 4 deletions trunk/net/8021q/vlan.c
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,7 @@ static int register_vlan_device(struct net_device *real_dev,
if (new_dev == NULL)
return -ENOBUFS;

dev_net_set(new_dev, net);
/* need 4 bytes for extra VLAN header info,
* hope the underlying device can handle it.
*/
Expand Down Expand Up @@ -406,9 +407,6 @@ static int vlan_device_event(struct notifier_block *unused, unsigned long event,
int i, flgs;
struct net_device *vlandev;

if (dev_net(dev) != &init_net)
return NOTIFY_DONE;

if (is_vlan_dev(dev)) {
__vlan_device_event(dev, event);
goto out;
Expand Down Expand Up @@ -534,7 +532,7 @@ static int vlan_ioctl_handler(struct net *net, void __user *arg)
case GET_VLAN_REALDEV_NAME_CMD:
case GET_VLAN_VID_CMD:
err = -ENODEV;
dev = __dev_get_by_name(&init_net, args.device1);
dev = __dev_get_by_name(net, args.device1);
if (!dev)
goto out;

Expand Down Expand Up @@ -665,6 +663,7 @@ static void vlan_exit_net(struct net *net)
struct vlan_net *vn;

vn = net_generic(net, vlan_net_id);
rtnl_kill_links(net, &vlan_link_ops);
vlan_proc_cleanup(net);
kfree(vn);
}
Expand Down
3 changes: 0 additions & 3 deletions trunk/net/8021q/vlan_dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion trunk/net/8021q/vlan_netlink.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit ad780f2

Please sign in to comment.