@@ -553,15 +553,17 @@ static bool mptcp_established_options_dss(struct sock *sk, struct sk_buff *skb,
mpext = skb ? mptcp_get_ext(skb) : NULL;
if (!skb || (mpext && mpext->use_map) || snd_data_fin_enable) {
- unsigned int map_size;
+ unsigned int map_size = TCPOLEN_MPTCP_DSS_BASE + TCPOLEN_MPTCP_DSS_MAP64;
- map_size = TCPOLEN_MPTCP_DSS_BASE + TCPOLEN_MPTCP_DSS_MAP64;
+ if (mpext) {
+ if (READ_ONCE(msk->csum_enabled))
+ map_size += TCPOLEN_MPTCP_DSS_CHECKSUM;
- remaining -= map_size;
- dss_size = map_size;
- if (mpext)
opts->ext_copy = *mpext;
+ }
+ dss_size = map_size;
+ remaining -= map_size;
if (skb && snd_data_fin_enable)
mptcp_write_data_fin(subflow, skb, &opts->ext_copy);
ret = true;
Account for csum len in mptcp_established_options_dss() Signed-off-by: Paolo Abeni <pabeni@redhat.com> --- v3 -> v4 - use opts->csum_reqd (Geliang) - reoder remaining, dss_size update (Geliang) --- net/mptcp/options.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-)