]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
sctp: Replace sockaddr with sockaddr_inet in sctp_addr union
authorKees Cook <kees@kernel.org>
Tue, 22 Jul 2025 17:18:33 +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 sctp_addr
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-3-kees@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
include/net/sctp/structs.h

index 1ad7ce71d0a78eed9d4a781a14ee4bda02bfe044..8a540ad9b5090ed8e9a9e7b54fbe9a1f4d57bce0 100644 (file)
@@ -51,9 +51,9 @@
  * We should wean ourselves off this.
  */
 union sctp_addr {
+       struct sockaddr_inet sa;        /* Large enough for both address families */
        struct sockaddr_in v4;
        struct sockaddr_in6 v6;
-       struct sockaddr sa;
 };
 
 /* Forward declarations for data structures. */