diff options
| author | Kees Cook <[email protected]> | 2025-05-21 20:46:14 +0000 |
|---|---|---|
| committer | Paolo Abeni <[email protected]> | 2025-05-27 06:25:43 +0000 |
| commit | 9ca6804ab7c34f65fcf2e29333a39e7807c30b60 (patch) | |
| tree | 48c42fe2fc7cbe9aa9b2f35016c53d543dc8ad71 /net/core/dev.c | |
| parent | net: usb: r8152: Convert to use struct sockaddr_storage internally (diff) | |
| download | kernel-9ca6804ab7c34f65fcf2e29333a39e7807c30b60.tar.gz kernel-9ca6804ab7c34f65fcf2e29333a39e7807c30b60.zip | |
net: core: Convert dev_set_mac_address() to struct sockaddr_storage
All users of dev_set_mac_address() are now using a struct sockaddr_storage.
Convert the internal data type to struct sockaddr_storage, drop the casts,
and update pointer types.
Acked-by: Gustavo A. R. Silva <[email protected]>
Signed-off-by: Kees Cook <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Paolo Abeni <[email protected]>
Diffstat (limited to 'net/core/dev.c')
| -rw-r--r-- | net/core/dev.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/net/core/dev.c b/net/core/dev.c index 6a0560546eeb..2b514d95c528 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -9697,6 +9697,7 @@ int netif_set_mac_address(struct net_device *dev, struct sockaddr_storage *ss, DECLARE_RWSEM(dev_addr_sem); +/* "sa" is a true struct sockaddr with limited "sa_data" member. */ int dev_get_mac_address(struct sockaddr *sa, struct net *net, char *dev_name) { size_t size = sizeof(sa->sa_data_min); |
