]> git.dujemihanovic.xyz Git - linux.git/commit
mptcp: correct MPTCP_SUBFLOW_ATTR_SSN_OFFSET reserved size
authorEugene Syromiatnikov <esyr@redhat.com>
Mon, 12 Aug 2024 06:51:23 +0000 (08:51 +0200)
committerJakub Kicinski <kuba@kernel.org>
Wed, 14 Aug 2024 02:13:25 +0000 (19:13 -0700)
commit655111b838cdabdb604f3625a9ff08c5eedb11da
treea0fd92a7c97f472344105ae31dd7ffdbf3fd67c3
parentdf934abb185c71c9f2fa07a5013672d0cbd36560
mptcp: correct MPTCP_SUBFLOW_ATTR_SSN_OFFSET reserved size

ssn_offset field is u32 and is placed into the netlink response with
nla_put_u32(), but only 2 bytes are reserved for the attribute payload
in subflow_get_info_size() (even though it makes no difference
in the end, as it is aligned up to 4 bytes).  Supply the correct
argument to the relevant nla_total_size() call to make it less
confusing.

Fixes: 5147dfb50832 ("mptcp: allow dumping subflow context to userspace")
Signed-off-by: Eugene Syromiatnikov <esyr@redhat.com>
Reviewed-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Link: https://patch.msgid.link/20240812065024.GA19719@asgard.redhat.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/mptcp/diag.c