You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Kees Cook says:
====================
net: Convert dev_set_mac_address() to struct sockaddr_storage
As part of the effort to allow the compiler to reason about object sizes,
we need to deal with the problematic variably sized struct sockaddr,
which has no internal runtime size tracking. In much of the network
stack the use of struct sockaddr_storage has been adopted. Continue the
transition toward this for more of the internal APIs. Specifically:
- inet_addr_is_any()
- netif_set_mac_address()
- dev_set_mac_address()
- dev_set_mac_address_user()
Only a few callers of dev_set_mac_address() needed adjustment; all others
were already using struct sockaddr_storage internally.
v1: https://lore.kernel.org/all/20250520222452.work.063-kees@kernel.org/
====================
Link: https://patch.msgid.link/20250521204310.it.500-kees@kernel.org
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
if (dev_set_mac_address(dev, (structsockaddr*)&ss, NULL)) {
1038
+
if (dev_set_mac_address(dev, &ss, NULL)) {
1039
1039
slave_err(slave->bond->dev, dev, "dev_set_mac_address on slave failed! ALB mode requires that the base driver support setting the hw address also when the network device's interface is open\n");
0 commit comments