diff options
author | Jakub Kicinski <kuba@kernel.org> | 2021-10-22 16:20:57 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-10-24 13:59:44 +0100 |
commit | efd38f75bb044fc7ff2f027e9009c92bce12fbd9 (patch) | |
tree | 464696ad0488de80c332955b8de94631784e029b /net/core | |
parent | 5fd348a050f7da8ad04d8017178ee5f9e3de917a (diff) | |
download | linux-efd38f75bb044fc7ff2f027e9009c92bce12fbd9.tar.bz2 |
net: rtnetlink: use __dev_addr_set()
Get it ready for constant netdev->dev_addr.
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core')
-rw-r--r-- | net/core/rtnetlink.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c index 79477dcae7c2..2af8aeeadadf 100644 --- a/net/core/rtnetlink.c +++ b/net/core/rtnetlink.c @@ -3204,8 +3204,8 @@ struct net_device *rtnl_create_link(struct net *net, const char *ifname, dev->mtu = mtu; } if (tb[IFLA_ADDRESS]) { - memcpy(dev->dev_addr, nla_data(tb[IFLA_ADDRESS]), - nla_len(tb[IFLA_ADDRESS])); + __dev_addr_set(dev, nla_data(tb[IFLA_ADDRESS]), + nla_len(tb[IFLA_ADDRESS])); dev->addr_assign_type = NET_ADDR_SET; } if (tb[IFLA_BROADCAST]) |