summaryrefslogtreecommitdiffstats
path: root/net/mptcp/protocol.c
diff options
context:
space:
mode:
authorKishen Maloor <kishen.maloor@intel.com>2022-05-02 13:52:35 -0700
committerJakub Kicinski <kuba@kernel.org>2022-05-03 16:54:55 -0700
commit70c708e82606f842dc1bcf0943b8acae30c4088f (patch)
treedd9f5fb5b7cafba0e2052bd34dbaa073fc577d5f /net/mptcp/protocol.c
parentd1ace2d9abf3eb5aaa91621050bfd02695721d18 (diff)
downloadlinux-70c708e82606f842dc1bcf0943b8acae30c4088f.tar.gz
linux-70c708e82606f842dc1bcf0943b8acae30c4088f.tar.bz2
linux-70c708e82606f842dc1bcf0943b8acae30c4088f.zip
mptcp: establish subflows from either end of connection
This change updates internal logic to permit subflows to be established from either the client or server ends of MPTCP connections. This symmetry and added flexibility may be harnessed by PM implementations running on either end in creating new subflows. The essence of this change lies in not relying on the "server_side" flag (which continues to be available if needed). Acked-by: Paolo Abeni <pabeni@redhat.com> Signed-off-by: Kishen Maloor <kishen.maloor@intel.com> Signed-off-by: Mat Martineau <mathew.j.martineau@linux.intel.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/mptcp/protocol.c')
-rw-r--r--net/mptcp/protocol.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c
index a5d466e6b538..5d529143ad77 100644
--- a/net/mptcp/protocol.c
+++ b/net/mptcp/protocol.c
@@ -3321,15 +3321,12 @@ bool mptcp_finish_join(struct sock *ssk)
return false;
}
- if (!msk->pm.server_side)
+ if (!list_empty(&subflow->node))
goto out;
if (!mptcp_pm_allow_new_subflow(msk))
goto err_prohibited;
- if (WARN_ON_ONCE(!list_empty(&subflow->node)))
- goto err_prohibited;
-
/* active connections are already on conn_list.
* If we can't acquire msk socket lock here, let the release callback
* handle it