forked from Minki/linux
mptcp: clarify when options can be used
RFC8684 doesn't seem to clearly specify which MPTCP options can be used together. Some options are mutually exclusive -- e.g. MP_CAPABLE and MP_JOIN --, some can be used together -- e.g. DSS + MP_PRIO --, some can but we prefer not to -- e.g. DSS + ADD_ADDR -- and some have to be used together at some points -- e.g. MP_FAIL and DSS. We need to clarify this as a base before allowing other modifications. For example, does it make sense to send a RM_ADDR with an MPC or MPJ? This remains open for possible future discussions. Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net> Signed-off-by: Mat Martineau <mathew.j.martineau@linux.intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
902c8f8648
commit
8cca39e251
@ -1267,8 +1267,27 @@ void mptcp_write_options(__be32 *ptr, const struct tcp_sock *tp,
|
||||
const struct sock *ssk = (const struct sock *)tp;
|
||||
struct mptcp_subflow_context *subflow;
|
||||
|
||||
/* DSS, MPC, MPJ, ADD_ADDR, FASTCLOSE and RST are mutually exclusive,
|
||||
* see mptcp_established_options*()
|
||||
/* Which options can be used together?
|
||||
*
|
||||
* X: mutually exclusive
|
||||
* O: often used together
|
||||
* C: can be used together in some cases
|
||||
* P: could be used together but we prefer not to (optimisations)
|
||||
*
|
||||
* Opt: | MPC | MPJ | DSS | ADD | RM | PRIO | FAIL | FC |
|
||||
* ------|------|------|------|------|------|------|------|------|
|
||||
* MPC |------|------|------|------|------|------|------|------|
|
||||
* MPJ | X |------|------|------|------|------|------|------|
|
||||
* DSS | X | X |------|------|------|------|------|------|
|
||||
* ADD | X | X | P |------|------|------|------|------|
|
||||
* RM | C | C | C | P |------|------|------|------|
|
||||
* PRIO | X | C | C | C | C |------|------|------|
|
||||
* FAIL | X | X | C | X | X | X |------|------|
|
||||
* FC | X | X | X | X | X | X | X |------|
|
||||
* RST | X | X | X | X | X | X | O | O |
|
||||
* ------|------|------|------|------|------|------|------|------|
|
||||
*
|
||||
* The same applies in mptcp_established_options() function.
|
||||
*/
|
||||
if (likely(OPTION_MPTCP_DSS & opts->suboptions)) {
|
||||
struct mptcp_ext *mpext = &opts->ext_copy;
|
||||
|
Loading…
Reference in New Issue
Block a user