[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <fc891ad2dd19edf7a11da0a62ca40c53581fa85e.camel@redhat.com>
Date: Tue, 24 Mar 2020 16:20:09 +0100
From: Paolo Abeni <pabeni@...hat.com>
To: Mat Martineau <mathew.j.martineau@...ux.intel.com>,
netdev@...r.kernel.org
Cc: Peter Krystad <peter.krystad@...ux.intel.com>,
eric.dumazet@...il.com, Florian Westphal <fw@...len.de>,
Matthieu Baerts <matthieu.baerts@...sares.net>
Subject: Re: [PATCH net-next 04/17] mptcp: Add handling of outgoing MP_JOIN
requests
On Mon, 2020-03-23 at 14:26 -0700, Mat Martineau wrote:
> @@ -131,6 +149,7 @@ static void subflow_init_req(struct request_sock *req,
>
> subflow_req->ssn_offset = TCP_SKB_CB(skb)->seq;
> } else if (rx_opt.mptcp.mp_join && listener->request_mptcp) {
> + subflow_req->ssn_offset = TCP_SKB_CB(skb)->seq;
> subflow_req->mp_join = 1;
> subflow_req->backup = rx_opt.mptcp.backup;
> subflow_req->remote_id = rx_opt.mptcp.join_id;
> @@ -169,13 +188,35 @@ static void subflow_v6_init_req(struct request_sock *req,
> }
> #endif
>
> +/* validate received truncated hmac and create hmac for third ACK */
> +static bool subflow_thmac_valid(struct mptcp_subflow_context *subflow)
> +{
> + u8 hmac[MPTCPOPT_HMAC_LEN];
> + u64 thmac;
> +
> + subflow_generate_hmac(subflow->remote_key, subflow->local_key,
> + subflow->remote_nonce, subflow->local_nonce,
> + hmac);
> +
> + thmac = get_unaligned_be64(hmac);
> + pr_debug("subflow=%p, token=%u, thmac=%llu, subflow->thmac=%llu\n",
> + subflow, subflow->token,
> + (unsigned long long)thmac,
> + (unsigned long long)subflow->thmac);
> +
> + return thmac == subflow->thmac;
> +}
> +
> static void subflow_finish_connect(struct sock *sk, const struct sk_buff *skb)
> {
> struct mptcp_subflow_context *subflow = mptcp_subflow_ctx(sk);
>
> subflow->icsk_af_ops->sk_rx_dst_set(sk, skb);
>
> - if (!subflow->conn_finished) {
> + if (subflow->conn_finished || !tcp_sk(sk)->is_mptcp)
> + return;
> +
> + if (subflow->mp_capable) {
> pr_debug("subflow=%p, remote_key=%llu", mptcp_subflow_ctx(sk),
> subflow->remote_key);
> mptcp_finish_connect(sk);
This chunk conflicts with commit c3c123d16c0ed4a81b9b18d3759a31c58b2fe504.
The next iteration will address such conflict.
Thanks,
Paolo
Powered by blists - more mailing lists