diff options
author | Paolo Abeni <pabeni@redhat.com> | 2021-08-27 03:44:52 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-08-27 11:45:07 +0300 |
commit | 74c7dfbee3e185b3c3a03f194e25689ed037fa3c (patch) | |
tree | dc45f79abe722e5809c9e6299b2da18dc3081e2b /net/mptcp/protocol.c | |
parent | a086aebae0ebe37e93ed8f6e686ca0d5c4375b44 (diff) | |
download | linux-74c7dfbee3e185b3c3a03f194e25689ed037fa3c.tar.xz |
mptcp: consolidate in_opt sub-options fields in a bitmask
This makes input options processing more consistent with
output ones and will simplify the next patch.
Also avoid clearing the suboption field after processing
it, since it's not needed.
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/mptcp/protocol.c')
-rw-r--r-- | net/mptcp/protocol.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c index 22214a58d892..1a408395e78f 100644 --- a/net/mptcp/protocol.c +++ b/net/mptcp/protocol.c @@ -2832,7 +2832,7 @@ struct sock *mptcp_sk_clone(const struct sock *sk, msk->token = subflow_req->token; msk->subflow = NULL; WRITE_ONCE(msk->fully_established, false); - if (mp_opt->csum_reqd) + if (mp_opt->suboptions & OPTION_MPTCP_CSUMREQD) WRITE_ONCE(msk->csum_enabled, true); msk->write_seq = subflow_req->idsn + 1; @@ -2841,7 +2841,7 @@ struct sock *mptcp_sk_clone(const struct sock *sk, msk->wnd_end = msk->snd_nxt + req->rsk_rcv_wnd; msk->setsockopt_seq = mptcp_sk(sk)->setsockopt_seq; - if (mp_opt->mp_capable) { + if (mp_opt->suboptions & OPTIONS_MPTCP_MPC) { msk->can_ack = true; msk->remote_key = mp_opt->sndr_key; mptcp_crypto_key_sha(msk->remote_key, NULL, &ack_seq); |