Skip to content

Commit 655111b

Browse files
esyr-rhkuba-moo
authored andcommitted
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: 5147dfb ("mptcp: allow dumping subflow context to userspace") Signed-off-by: Eugene Syromiatnikov <[email protected]> Reviewed-by: Matthieu Baerts (NGI0) <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent df934ab commit 655111b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/mptcp/diag.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ static size_t subflow_get_info_size(const struct sock *sk)
9494
nla_total_size(4) + /* MPTCP_SUBFLOW_ATTR_RELWRITE_SEQ */
9595
nla_total_size_64bit(8) + /* MPTCP_SUBFLOW_ATTR_MAP_SEQ */
9696
nla_total_size(4) + /* MPTCP_SUBFLOW_ATTR_MAP_SFSEQ */
97-
nla_total_size(2) + /* MPTCP_SUBFLOW_ATTR_SSN_OFFSET */
97+
nla_total_size(4) + /* MPTCP_SUBFLOW_ATTR_SSN_OFFSET */
9898
nla_total_size(2) + /* MPTCP_SUBFLOW_ATTR_MAP_DATALEN */
9999
nla_total_size(4) + /* MPTCP_SUBFLOW_ATTR_FLAGS */
100100
nla_total_size(1) + /* MPTCP_SUBFLOW_ATTR_ID_REM */

0 commit comments

Comments
 (0)