[PATCH mptcp-next] mptcp: fix a DSS option writting error

Geliang Tang posted 1 patch 2 years, 2 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/multipath-tcp/mptcp_net-next tags/patchew/202f88648cac54c062f5964526f55a2bd561cebf.1641373778.git.geliang.tang@suse.com
Maintainers: "David S. Miller" <davem@davemloft.net>, Paolo Abeni <pabeni@redhat.com>, Mat Martineau <mathew.j.martineau@linux.intel.com>, Jakub Kicinski <kuba@kernel.org>, Matthieu Baerts <matthieu.baerts@tessares.net>
net/mptcp/options.c | 1 +
1 file changed, 1 insertion(+)
[PATCH mptcp-next] mptcp: fix a DSS option writting error
Posted by Geliang Tang 2 years, 2 months ago
'ptr += 1;' was omitted in the orignal code since DSS is the last option.
But now DSS is not the last one, we need to add it.

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

diff --git a/net/mptcp/options.c b/net/mptcp/options.c
index c6726e8389ec..fd6c19b809f8 100644
--- a/net/mptcp/options.c
+++ b/net/mptcp/options.c
@@ -1327,6 +1327,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.31.1