]> git.baikalelectronics.ru Git - kernel.git/commit
mptcp: support MPJoin with IPv4 mapped in v6 sk
authorMatthieu Baerts <matthieu.baerts@tessares.net>
Mon, 25 Jan 2021 18:59:00 +0000 (10:59 -0800)
committerJakub Kicinski <kuba@kernel.org>
Thu, 28 Jan 2021 00:53:47 +0000 (16:53 -0800)
commit87dc939dafb47791709bbe64c630401dc505b2b7
tree304a2ee7651c5641589e04277286ae8a093913db
parent1916db8f81f6816014e5fbacd5b621e84cd588dd
mptcp: support MPJoin with IPv4 mapped in v6 sk

With an IPv4 mapped in v6 socket, we were trying to call inet6_bind()
with an IPv4 address resulting in a -EINVAL error because the given
addr_len -- size of the address structure -- was too short.

We now make sure to use address structures for the same family as the
MPTCP socket for both the bind() and the connect(). It means we convert
v4 addresses to v4 mapped in v6 or the opposite if needed.

Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/122
Co-developed-by: Geliang Tang <geliangtang@gmail.com>
Signed-off-by: Geliang Tang <geliangtang@gmail.com>
Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
Signed-off-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/mptcp/subflow.c