From: Geliang Tang Date: Thu, 6 Jan 2022 22:06:37 +0000 (-0800) Subject: mptcp: fix a DSS option writing error X-Git-Tag: accepted/tizen/unified/20230118.172025~3362 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e1652f70e8964218c916ae4b6da3056b8f3c6e11;p=platform%2Fkernel%2Flinux-rpi.git mptcp: fix a DSS option writing error [ Upstream commit 110b6d1fe98fd7af9893992459b651594d789293 ] '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: 1bff1e43a30e ("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 Signed-off-by: Sasha Levin --- diff --git a/net/mptcp/options.c b/net/mptcp/options.c index f69a1ca..e515ba9 100644 --- a/net/mptcp/options.c +++ b/net/mptcp/options.c @@ -1321,6 +1321,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 ((OPTION_MPTCP_MPC_SYN | OPTION_MPTCP_MPC_SYNACK | OPTION_MPTCP_MPC_ACK) & opts->suboptions) {