diff mbox series

Squash-to-mptcp-Create-SUBFLOW-socket-for-incoming-connections

Message ID 500c372287d2af8bbbe0dc811e5566b07ce2160e.1576196206.git.pabeni@redhat.com
State Accepted, archived
Delegated to: Matthieu Baerts
Headers show
Series Squash-to-mptcp-Create-SUBFLOW-socket-for-incoming-connections | expand

Commit Message

Paolo Abeni Dec. 13, 2019, 12:18 a.m. UTC
Need to explicitly clear msk->subflow on passive connection, or
it will inherit the listener msk value, which is uncorrect

This fixes hang-up pre-v1 patches.

Still investigating why the v1 code did non hang without this.
---
 net/mptcp/protocol.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Matthieu Baerts Dec. 13, 2019, 12:25 a.m. UTC | #1
Hi Paolo,

On 13/12/2019 01:18, Paolo Abeni wrote:
> Need to explicitly clear msk->subflow on passive connection, or
> it will inherit the listener msk value, which is uncorrect
> 
> This fixes hang-up pre-v1 patches.
> 
> Still investigating why the v1 code did non hang without this.

Thank you for the patch, that was quick!

I already applied it to let the CI running during the night. If needed, 
we can still easily revert/improve it later.

- 9029651dddd7: "squashed" in "mptcp: Create SUBFLOW socket for incoming 
connections"
- d71e217c05ae: conflict in t/mptcp-Add-key-generation-and-token-tree
- 45cba5f6b369..3b3ffeb26480: result

Tests + export in progress.

Cheers,
Matt
diff mbox series

Patch

diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c
index 87d66842f7fa..11c6b1678169 100644
--- a/net/mptcp/protocol.c
+++ b/net/mptcp/protocol.c
@@ -280,6 +280,7 @@  static struct sock *mptcp_accept(struct sock *sk, int flags, int *err,
 		msk = mptcp_sk(new_mptcp_sock);
 		msk->remote_key = subflow->remote_key;
 		msk->local_key = subflow->local_key;
+		msk->subflow = NULL;
 
 		newsk = new_mptcp_sock;
 		mptcp_copy_inaddrs(newsk, ssk);