mptcp: userspace pm send RM_ADDR for ID 0
authorGeliang Tang <geliang.tang@suse.com>
Wed, 25 Oct 2023 23:37:04 +0000 (16:37 -0700)
committerJakub Kicinski <kuba@kernel.org>
Fri, 27 Oct 2023 15:47:17 +0000 (08:47 -0700)
commit84c531f54ad9a124a924c9505d74e33d16965146
tree9d347a53e26590d00cc2ee430d823182835b938c
parent9168ea02b898d3dde98b51e4bd3fb082bd438dab
mptcp: userspace pm send RM_ADDR for ID 0

This patch adds the ability to send RM_ADDR for local ID 0. Check
whether id 0 address is removed, if not, put id 0 into a removing
list, pass it to mptcp_pm_remove_addr() to remove id 0 address.

There is no reason not to allow the userspace to remove the initial
address (ID 0). This special case was not taken into account not
letting the userspace to delete all addresses as announced.

Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/379
Reviewed-by: Matthieu Baerts <matttbe@kernel.org>
Signed-off-by: Geliang Tang <geliang.tang@suse.com>
Signed-off-by: Mat Martineau <martineau@kernel.org>
Link: https://lore.kernel.org/r/20231025-send-net-next-20231025-v1-3-db8f25f798eb@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/mptcp/pm_userspace.c