mptcp: use proper req destructor for IPv6
authorMatthieu Baerts <matthieu.baerts@tessares.net>
Sat, 10 Dec 2022 00:28:10 +0000 (16:28 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 12 Jan 2023 10:59:19 +0000 (11:59 +0100)
commitbd5dc96fea4edd16d2e22f41b4dd50a4cfbeb919
tree20782672dde1ccefd1a1bbc8678d3636fc661034
parent78bd6ab52c03894a63692e7e09c067842a16af17
mptcp: use proper req destructor for IPv6

commit d3295fee3c756ece33ac0d935e172e68c0a4161b upstream.

Before, only the destructor from TCP request sock in IPv4 was called
even if the subflow was IPv6.

It is important to use the right destructor to avoid memory leaks with
some advanced IPv6 features, e.g. when the request socks contain
specific IPv6 options.

Fixes: 79c0949e9a09 ("mptcp: Add key generation and token tree")
Reviewed-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
Cc: stable@vger.kernel.org
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/mptcp/subflow.c