Commit 8b98604e authored by Bjørn Mork's avatar Bjørn Mork Committed by David S. Miller

net: macvlan: inherit addr_assign_type along with dev_addr

A device inheriting a random or set address should reflect this in
its addr_assign_type.

Cc: Patrick McHardy <kaber@trash.net>
Signed-off-by: default avatarBjørn Mork <bjorn@mork.no>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 2fcc8005
...@@ -823,7 +823,7 @@ int macvlan_common_newlink(struct net *src_net, struct net_device *dev, ...@@ -823,7 +823,7 @@ int macvlan_common_newlink(struct net *src_net, struct net_device *dev,
if (port->count) if (port->count)
return -EINVAL; return -EINVAL;
port->passthru = true; port->passthru = true;
memcpy(dev->dev_addr, lowerdev->dev_addr, ETH_ALEN); eth_hw_addr_inherit(dev, lowerdev);
} }
err = netdev_upper_dev_link(lowerdev, dev); err = netdev_upper_dev_link(lowerdev, dev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment