]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
wireguard: peer: Replace sockaddr with sockaddr_inet
authorKees Cook <kees@kernel.org>
Tue, 22 Jul 2025 17:18:32 +0000 (10:18 -0700)
committerJakub Kicinski <kuba@kernel.org>
Fri, 25 Jul 2025 22:29:58 +0000 (15:29 -0700)
As part of the removal of the variably-sized sockaddr for kernel
internals, replace struct sockaddr with sockaddr_inet in the endpoint
union.

No binary changes; the union size remains unchanged due to sockaddr_inet
matching the size of sockaddr_in6.

Signed-off-by: Kees Cook <kees@kernel.org>
Link: https://patch.msgid.link/20250722171836.1078436-2-kees@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/wireguard/peer.h

index 76e4d3128ad4ea3f0601cb5055280a4dc097adc2..718fb42bdac7e36438461abf59704eb60515a5fa 100644 (file)
@@ -20,7 +20,7 @@ struct wg_device;
 
 struct endpoint {
        union {
-               struct sockaddr addr;
+               struct sockaddr_inet addr;     /* Large enough for both address families */
                struct sockaddr_in addr4;
                struct sockaddr_in6 addr6;
        };