Skip to content

Commit

Permalink
[8021Q]: transfer dev_id from real device
Browse files Browse the repository at this point in the history
A net_device struct provides field dev_id. It is used for
unique ipv6 generation in case of shared network cards
(as for the OSA network cards of IBM System z).
If VLAN devices are built on top of such shared network cards,
this dev_id information needs to be transferred to the VLAN device.

Signed-off-by: Ursula Braun <braunu@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Ursula Braun authored and David S. Miller committed Oct 10, 2007
1 parent 45b17f4 commit 3607c44
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions net/8021q/vlan.c
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,9 @@ static int vlan_dev_init(struct net_device *dev)
(1<<__LINK_STATE_DORMANT))) |
(1<<__LINK_STATE_PRESENT);

/* ipv6 shared card related stuff */
dev->dev_id = real_dev->dev_id;

if (is_zero_ether_addr(dev->dev_addr))
memcpy(dev->dev_addr, real_dev->dev_addr, dev->addr_len);
if (is_zero_ether_addr(dev->broadcast))
Expand Down

0 comments on commit 3607c44

Please sign in to comment.