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>
This commit is contained in:
committed by
David S. Miller
parent
a086aebae0
commit
74c7dfbee3
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user