]> www.infradead.org Git - users/jedix/linux-maple.git/commit
net: core: Switch netif_set_mac_address() to struct sockaddr_storage
authorKees Cook <kees@kernel.org>
Wed, 21 May 2025 20:46:10 +0000 (13:46 -0700)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 27 May 2025 06:25:42 +0000 (08:25 +0200)
commit161972650d6795ea00f8b72557cf3c3e593ed250
treeae9e97e5674b98f5d107343c70786b43775e19e3
parented449ddbd867f2cc02d6890c231431f264a876eb
net: core: Switch netif_set_mac_address() to struct sockaddr_storage

In order to avoid passing around struct sockaddr that has a size the
compiler cannot reason about (nor track at runtime), convert
netif_set_mac_address() to take struct sockaddr_storage. This is just a
cast conversion, so there is are no binary changes. Following patches
will make actual allocation changes.

Acked-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Signed-off-by: Kees Cook <kees@kernel.org>
Link: https://patch.msgid.link/20250521204619.2301870-2-kees@kernel.org
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
include/linux/netdevice.h
net/core/dev.c
net/core/dev_api.c
net/core/rtnetlink.c