From nobody Mon Feb 9 13:58:01 2026 Received: from out-184.mta1.migadu.com (out-184.mta1.migadu.com [95.215.58.184]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5E29412E64 for ; Fri, 8 Dec 2023 10:07:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="toCTlL9u" X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1702030040; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=b2MIZ0kBrVrlWjeqSW49xldVFtC7raNdDU8hm2sc0Tg=; b=toCTlL9u92AFpjepHHcLK0sPLNLAgYzdYhtvRyooqmlKXQh+lemgBwMe4JjJbBKSmd8nIi xD55cHWdF0EicJ+8QYKAJWKdPwZM+1BqoXrGU+g2SePlIGBDaspV2hoY/MapFQJQNZHZN8 H8xAMDoqHruyYVlHgY5qcJ9ATZpSuiU= From: Geliang Tang To: mptcp@lists.linux.dev Cc: Geliang Tang Subject: [PATCH mptcp-next v14 14/25] mptcp: map v4 address to v6 when destroying subflow Date: Fri, 8 Dec 2023 18:07:27 +0800 Message-Id: <9804e377e2db617669eac40b4f7b6bca6a595aeb.1702029539.git.geliang.tang@linux.dev> In-Reply-To: References: Precedence: bulk X-Mailing-List: mptcp@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Migadu-Flow: FLOW_OUT Content-Type: text/plain; charset="utf-8" In mptcp_pm_nl_subflow_destroy_doit(), before checking local address family with remote address family, map an IPv4 address to an IPv6 address if the pair is a v4-mapped address. Signed-off-by: Geliang Tang --- net/mptcp/pm_userspace.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/net/mptcp/pm_userspace.c b/net/mptcp/pm_userspace.c index 489bb0e61118..ce3d5dd8d34d 100644 --- a/net/mptcp/pm_userspace.c +++ b/net/mptcp/pm_userspace.c @@ -502,6 +502,16 @@ int mptcp_pm_nl_subflow_destroy_doit(struct sk_buff *s= kb, struct genl_info *info goto destroy_err; } =20 +#if IS_ENABLED(CONFIG_MPTCP_IPV6) + if (addr_l.family =3D=3D AF_INET && ipv6_addr_v4mapped(&addr_r.addr6)) { + ipv6_addr_set_v4mapped(addr_l.addr.s_addr, &addr_l.addr6); + addr_l.family =3D AF_INET6; + } + if (addr_r.family =3D=3D AF_INET && ipv6_addr_v4mapped(&addr_l.addr6)) { + ipv6_addr_set_v4mapped(addr_r.addr.s_addr, &addr_r.addr6); + addr_r.family =3D AF_INET6; + } +#endif if (addr_l.family !=3D addr_r.family) { GENL_SET_ERR_MSG(info, "address families do not match"); err =3D -EINVAL; --=20 2.35.3