[PATCH mptcp-next v8 3/8] mptcp: fix a DSS option writing error

Matthieu Baerts posted 8 patches 4 years, 1 month ago
Maintainers: "David S. Miller" <davem@davemloft.net>, Geliang Tang <geliangtang@xiaomi.com>, Andrii Nakryiko <andrii@kernel.org>, Yonghong Song <yhs@fb.com>, John Fastabend <john.fastabend@gmail.com>, Paolo Abeni <pabeni@redhat.com>, KP Singh <kpsingh@kernel.org>, Shuah Khan <shuah@kernel.org>, Alexei Starovoitov <ast@kernel.org>, Jakub Kicinski <kuba@kernel.org>, Song Liu <songliubraving@fb.com>, Daniel Borkmann <daniel@iogearbox.net>, Mat Martineau <mathew.j.martineau@linux.intel.com>, Matthieu Baerts <matthieu.baerts@tessares.net>, Martin KaFai Lau <kafai@fb.com>
There is a newer version of this series
[PATCH mptcp-next v8 3/8] mptcp: fix a DSS option writing error
Posted by Matthieu Baerts 4 years, 1 month ago
From: Geliang Tang <geliang.tang@suse.com>

'ptr += 1;' was omitted in the original code.

If the DSS is the last option -- which is what we have most of the
time -- that's not an issue.

Fixes: 1bff1e43a30e ("mptcp: optimize out option generation")
Signed-off-by: Geliang Tang <geliang.tang@suse.com>
Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
---
 net/mptcp/options.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/net/mptcp/options.c b/net/mptcp/options.c
index 36ab69906af3..bbf61dedb4b5 100644
--- a/net/mptcp/options.c
+++ b/net/mptcp/options.c
@@ -1334,6 +1334,7 @@ void mptcp_write_options(__be32 *ptr, const struct tcp_sock *tp,
 				put_unaligned_be32(mpext->data_len << 16 |
 						   TCPOPT_NOP << 8 | TCPOPT_NOP, ptr);
 			}
+			ptr += 1;
 		}
 	} else if (OPTIONS_MPTCP_MPC & opts->suboptions) {
 		u8 len, flag = MPTCP_CAP_HMAC_SHA256;
-- 
2.33.1