All of lore.kernel.org
 help / color / mirror / Atom feed
* [MPTCP] [MPTCP][PATCH v2 mptcp-next 2/3] mptcp: skip closing the initial subsocket
@ 2021-02-23  8:26 Geliang Tang
  0 siblings, 0 replies; only message in thread
From: Geliang Tang @ 2021-02-23  8:26 UTC (permalink / raw)
  To: mptcp

[-- Attachment #1: Type: text/plain, Size: 825 bytes --]

If the removing address id is 0, skip invoking mptcp_close_ssk to close
the initial subsocket.

Signed-off-by: Geliang Tang <geliangtang(a)gmail.com>
---
 net/mptcp/pm_netlink.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/net/mptcp/pm_netlink.c b/net/mptcp/pm_netlink.c
index 85417b0e73fe..b5cee3c66e5c 100644
--- a/net/mptcp/pm_netlink.c
+++ b/net/mptcp/pm_netlink.c
@@ -631,7 +631,8 @@ static void mptcp_pm_nl_rm_addr_or_subflow(struct mptcp_sock *msk,
 				 type == RM_ADDR ? "address" : "subflow", i, rm_list.ids[i]);
 			spin_unlock_bh(&msk->pm.lock);
 			mptcp_subflow_shutdown(sk, ssk, how);
-			mptcp_close_ssk(sk, ssk, subflow);
+			if (rm_list.ids[i])
+				mptcp_close_ssk(sk, ssk, subflow);
 			spin_lock_bh(&msk->pm.lock);
 
 			if (type == RM_ADDR) {
-- 
2.29.2

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2021-02-23  8:26 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-23  8:26 [MPTCP] [MPTCP][PATCH v2 mptcp-next 2/3] mptcp: skip closing the initial subsocket Geliang Tang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.