mptcp: add address into userspace pm list
authorGeliang Tang <geliang.tang@suse.com>
Mon, 5 Jun 2023 03:25:19 +0000 (20:25 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 5 Jun 2023 14:15:57 +0000 (15:15 +0100)
commit24430f8bf51655c5ab7ddc2fafe939dd3cd0dd47
treea817c2530f46885edc10714aa67a179fdcf716a2
parent48d73f609dcceeb563b0d960e59bf0362581e39c
mptcp: add address into userspace pm list

Add the address into userspace_pm_local_addr_list when the subflow is
created. Make sure it can be found in mptcp_nl_cmd_remove(). And delete
it in the new helper mptcp_userspace_pm_delete_local_addr().

By doing this, the "REMOVE" command also works with subflows that have
been created via the "SUB_CREATE" command instead of restricting to
the addresses that have been announced via the "ANNOUNCE" command.

Fixes: d9a4594edabf ("mptcp: netlink: Add MPTCP_PM_CMD_REMOVE")
Link: https://github.com/multipath-tcp/mptcp_net-next/issues/379
Cc: stable@vger.kernel.org
Reviewed-by: Matthieu Baerts <matthieu.baerts@tessares.net>
Signed-off-by: Geliang Tang <geliang.tang@suse.com>
Signed-off-by: Mat Martineau <martineau@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/mptcp/pm_userspace.c