projects
/
linux-block.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5fd348a
)
net: rtnetlink: use __dev_addr_set()
author
Jakub Kicinski
<kuba@kernel.org>
Fri, 22 Oct 2021 23:20:57 +0000
(16:20 -0700)
committer
David S. Miller
<davem@davemloft.net>
Sun, 24 Oct 2021 12:59:44 +0000
(13:59 +0100)
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>
net/core/rtnetlink.c
patch
|
blob
|
blame
|
history
diff --git
a/net/core/rtnetlink.c
b/net/core/rtnetlink.c
index 79477dcae7c2e4a7dd5868690ff2945d332485fe..2af8aeeadadf0acb2fa9f8febfa96c11b94e3a8c 100644
(file)
--- 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])