Commit 13ac17a3 authored by Geliang Tang's avatar Geliang Tang Committed by David S. Miller
Browse files

mptcp: use OPTIONS_MPTCP_MPC



Since OPTIONS_MPTCP_MPC has been defined, use it instead of open-coding.

Acked-by: default avatarPaolo Abeni <pabeni@redhat.com>
Signed-off-by: default avatarGeliang Tang <geliangtang@xiaomi.com>
Signed-off-by: default avatarMat Martineau <mathew.j.martineau@linux.intel.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 0d199e43
Loading
Loading
Loading
Loading
+2 −5
Original line number Diff line number Diff line
@@ -748,9 +748,7 @@ static bool mptcp_established_options_mp_prio(struct sock *sk,
	/* can't send MP_PRIO with MPC, as they share the same option space:
	 * 'backup'. Also it makes no sense at all
	 */
	if (!subflow->send_mp_prio ||
	    ((OPTION_MPTCP_MPC_SYN | OPTION_MPTCP_MPC_SYNACK |
	      OPTION_MPTCP_MPC_ACK) & opts->suboptions))
	if (!subflow->send_mp_prio || (opts->suboptions & OPTIONS_MPTCP_MPC))
		return false;

	/* account for the trailing 'nop' option */
@@ -1327,8 +1325,7 @@ void mptcp_write_options(__be32 *ptr, const struct tcp_sock *tp,
						   TCPOPT_NOP << 8 | TCPOPT_NOP, ptr);
			}
		}
	} else if ((OPTION_MPTCP_MPC_SYN | OPTION_MPTCP_MPC_SYNACK |
		    OPTION_MPTCP_MPC_ACK) & opts->suboptions) {
	} else if (OPTIONS_MPTCP_MPC & opts->suboptions) {
		u8 len, flag = MPTCP_CAP_HMAC_SHA256;

		if (OPTION_MPTCP_MPC_SYN & opts->suboptions) {