Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 351273
b: refs/heads/master
c: 7cd43db
h: refs/heads/master
i:
  351271: f7a754c
v: v3
  • Loading branch information
Jiri Pirko authored and David S. Miller committed Jan 4, 2013
1 parent 8d9cba6 commit c407a62
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 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: 9ff162a8b96c96238773972e26288a366e403b0c
refs/heads/master: 7cd43db77eed83ce9c2086edb402748256e05f14
9 changes: 8 additions & 1 deletion trunk/drivers/net/macvlan.c
Original file line number Diff line number Diff line change
Expand Up @@ -764,16 +764,22 @@ int macvlan_common_newlink(struct net *src_net, struct net_device *dev,
memcpy(dev->dev_addr, lowerdev->dev_addr, ETH_ALEN);
}

err = netdev_upper_dev_link(lowerdev, dev);
if (err)
goto destroy_port;

port->count += 1;
err = register_netdevice(dev);
if (err < 0)
goto destroy_port;
goto upper_dev_unlink;

list_add_tail(&vlan->list, &port->vlans);
netif_stacked_transfer_operstate(lowerdev, dev);

return 0;

upper_dev_unlink:
netdev_upper_dev_unlink(lowerdev, dev);
destroy_port:
port->count -= 1;
if (!port->count)
Expand All @@ -797,6 +803,7 @@ void macvlan_dellink(struct net_device *dev, struct list_head *head)

list_del(&vlan->list);
unregister_netdevice_queue(dev, head);
netdev_upper_dev_unlink(vlan->lowerdev, dev);
}
EXPORT_SYMBOL_GPL(macvlan_dellink);

Expand Down

0 comments on commit c407a62

Please sign in to comment.