Commit 1af5a799 authored by Geliang Tang's avatar Geliang Tang Committed by Geliang Tang
Browse files

mptcp: use mptcp_get_ext helper

mainline inclusion
from mainline-v6.7-rc1
commit a16c054b527bbaed611fef03e8b19e111a1769ef
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/I9VYQ9
CVE: NA

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=a16c054b527bbaed611fef03e8b19e111a1769ef



--------------------------------

Use mptcp_get_ext() helper defined in protocol.h instead of open-coding
it in mptcp_sendmsg_frag().

Reviewed-by: default avatarMatthieu Baerts <matttbe@kernel.org>
Signed-off-by: default avatarGeliang Tang <geliang.tang@suse.com>
Signed-off-by: default avatarMat Martineau <martineau@kernel.org>
Link: https://lore.kernel.org/r/20231025-send-net-next-20231025-v1-6-db8f25f798eb@kernel.org


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
Reviewed-by: default avatarJackie Liu <liuyun01@kylinos.cn>
Signed-off-by: default avatarGeliang Tang <tanggeliang@kylinos.cn>
parent 9e329f08
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1257,7 +1257,7 @@ static int mptcp_sendmsg_frag(struct sock *sk, struct sock *ssk,
		 * queue management operation, to avoid breaking the ext <->
		 * SSN association set here
		 */
		mpext = skb_ext_find(skb, SKB_EXT_MPTCP);
		mpext = mptcp_get_ext(skb);
		if (!mptcp_skb_can_collapse_to(data_seq, skb, mpext)) {
			TCP_SKB_CB(skb)->eor = 1;
			tcp_mark_push(tcp_sk(ssk), skb);
@@ -1280,7 +1280,7 @@ static int mptcp_sendmsg_frag(struct sock *sk, struct sock *ssk,

		i = skb_shinfo(skb)->nr_frags;
		reuse_skb = false;
		mpext = skb_ext_find(skb, SKB_EXT_MPTCP);
		mpext = mptcp_get_ext(skb);
	}

	/* Zero window and all data acked? Probe. */