Brief Description:Mptcp still carries out three handshakes in accordance with normal TCP, only adding MPTCP-specific information to the handshake process.
Build ProcessThree times the handshake process is as shown: the first SYN packet sent by the left client carries the key of the client itself, the right side of the Syn/ack carries its own key, and the last left client sends the last ACK with both sides of the key. The definition of mp_capable in Mptcp is as follows: subtype is defined as follows:
kernel implementation of MPTCPMptcp the invocation of the SYN packet on the client is as follows: The key function is mptcp_syn_options to the MPTCP option, the source code is as follows: "NET/MPTCP/MPTCP_OUTPUT.C" line 843 of 1667843 Void Mptcp_syn_options (struct sock *sk, struct tcp_out_options *opts,
844 unsigned *remaining)
845 {
846 struct Tcp_sock *tp = Tcp_sk (SK);
847
848 opts->options |= option_mptcp;
849 if (IS_MASTER_TP (TP)) {
850 opts->mptcp_options |= option_mp_capable | Option_type_syn;
851 *remaining-= mptcp_sub_len_capable_syn_align;
852 Opts->mp_capable.sender_key = tp->mptcp_loc_key;
853 opts->dss_csum =!! Sysctl_mptcp_checksum;
854} else {
855 struct MPTCP_CB *MPCB = tp->mpcb;
856
857 opts->mptcp_options |= Option_mp_join | Option_type_syn;
858 *remaining-= mptcp_sub_len_join_syn_align;
859 Opts->mp_join_syns.token = mpcb->mptcp_rem_token;
860 Opts->mp_join_syns.low_prio = tp->mptcp->low_prio;
861 opts->addr_id = tp->mptcp->loc_id;
862 Opts->mp_join_syns.sender_nonce = tp->mptcp->mptcp_loc_nonce;
863}
864} Since the three-time handshake is definitely master sock, the MPTCP option is assigned in 850 rows to 853 rows. The options are assigned using the Mptcp_synack_options function when the corresponding server sends the Syn/ack package. And the last ACK packet is called the function mptcp_established_options operation.
Conclusion:1. MPTCP uses TCP's three-time handshake to exchange key information. References: 1. RFC6824 https://tools.ietf.org/html/rfc6824#page-4
MPTCP Source Code Analysis (a) MPTCP three-time handshake