]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
mptcp: check addrs list in userspace_pm_get_local_id
authorGeliang Tang <geliang@kernel.org>
Thu, 8 Feb 2024 18:03:53 +0000 (19:03 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 23 Feb 2024 08:25:00 +0000 (09:25 +0100)
commited34dfa19ddbd1e4c85a73636f8cba0211025ea4
tree119077d4936a539750a475c307c9488cef1f6d76
parenta2d743747e9e181f53057261a969251ed2448645
mptcp: check addrs list in userspace_pm_get_local_id

commit f012d796a6de662692159c539689e47e662853a8 upstream.

Before adding a new entry in mptcp_userspace_pm_get_local_id(), it's
better to check whether this address is already in userspace pm local
address list. If it's in the list, no need to add a new entry, just
return it's address ID and use this address.

Fixes: 8b20137012d9 ("mptcp: read attributes of addr entries managed by userspace PMs")
Cc: stable@vger.kernel.org
Signed-off-by: Geliang Tang <geliang.tang@linux.dev>
Reviewed-by: Mat Martineau <martineau@kernel.org>
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/mptcp/pm_userspace.c