lkml.org 
[lkml]   [2022]   [Jan]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 5.16 0420/1039] mptcp: fix a DSS option writing error
    Date
    From: Geliang Tang <geliang.tang@suse.com>

    [ 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 <matthieu.baerts@tessares.net>
    Signed-off-by: Geliang Tang <geliang.tang@suse.com>
    Signed-off-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    ---
    net/mptcp/options.c | 1 +
    1 file changed, 1 insertion(+)

    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;
    --
    2.34.1


    \
     
     \ /
      Last update: 2022-01-25 01:11    [W:2.625 / U:0.580 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site