Skip to content

Commit

Permalink
mptcp: fix a DSS option writing error
Browse files Browse the repository at this point in the history
'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: 1bff1e4 ("mptcp: optimize out option generation")
Reviewed-by: Matthieu Baerts <[email protected]>
Signed-off-by: Geliang Tang <[email protected]>
Signed-off-by: Mat Martineau <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
geliangtang authored and davem330 committed Jan 7, 2022
1 parent 04fac2c commit 110b6d1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions net/mptcp/options.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 110b6d1

Please sign in to comment.