From: Geliang Tang Date: Thu, 6 Jan 2022 22:06:37 +0000 (-0800) Subject: mptcp: fix a DSS option writing error X-Git-Tag: baikal/aarch64/sdk6.1~4966^2^2~8^2~1 X-Git-Url: https://git.baikalelectronics.ru/sdk/?a=commitdiff_plain;h=13833ee7d86289e76b955db427cfd0070f2a8f9d;p=kernel.git mptcp: fix a DSS option writing error '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. But it is if we need to send something else after like a RM_ADDR or an MP_PRIO. Fixes: e8d770ee0139 ("mptcp: optimize out option generation") Reviewed-by: Matthieu Baerts Signed-off-by: Geliang Tang Signed-off-by: Mat Martineau Signed-off-by: David S. Miller --- diff --git a/net/mptcp/options.c b/net/mptcp/options.c index 96c6efdd48bcc..6661b1d6520f1 100644 --- a/net/mptcp/options.c +++ b/net/mptcp/options.c @@ -1319,6 +1319,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;