]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
mptcp: pm: align endpoint flags size with the NL specs
authorMatthieu Baerts (NGI0) <matttbe@kernel.org>
Tue, 3 Feb 2026 18:41:21 +0000 (19:41 +0100)
committerJakub Kicinski <kuba@kernel.org>
Thu, 5 Feb 2026 02:45:09 +0000 (18:45 -0800)
The MPTCP Netlink specs describe the 'flags' as a u32 type. Internally,
a u8 type was used.

Using a u8 is currently fine, because only the 5 first bits are used.
But there is also no reason not to be aligns with the specs, and
to stick to a u8. Especially because there is a whole of 3 bytes after
in both mptcp_pm_local and mptcp_pm_addr_entry structures.

Also, setting it to a u32 will allow future flags, just in case.

Reviewed-by: Mat Martineau <martineau@kernel.org>
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Link: https://patch.msgid.link/20260203-net-next-mptcp-misc-feat-6-20-v1-5-31ec8bfc56d1@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/mptcp/protocol.h

index 66a30409f21785d0d5bf9a6846fe1a86bcd205eb..f4bfe91ca7f9de53d79bf7e86ce98bdf5f245795 100644 (file)
@@ -246,14 +246,14 @@ struct mptcp_pm_data {
 
 struct mptcp_pm_local {
        struct mptcp_addr_info  addr;
-       u                     flags;
+       u32                     flags;
        int                     ifindex;
 };
 
 struct mptcp_pm_addr_entry {
        struct list_head        list;
        struct mptcp_addr_info  addr;
-       u                     flags;
+       u32                     flags;
        int                     ifindex;
        struct socket           *lsk;
 };