Skip to contentSkip to conversation

mptcp: fix state update on accept()

PATCH In review Paolo Abeni 2 participants 2 messages May 9, 2019 – May 10, 2019

Subsystems (2)
lore
Share & tools
lore

Paolo Abeni

author
#0 lore raw

PATCH 1/1 mptcp: fix state update on accept()

We must update the newly created socket status, not the listener socket.

Fixes cc0d09002896 ("mptcp: Implement MPTCP receive path")
Signed-off-by Paolo Abeni <pabeni(a)redhat.com>
---
 net/mptcp/protocol.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/mptcp/protocol.c +1 -1
index 8028bb7ae321..fa77d399a593 100644
@@ -586,7 +586,7 @@ static struct sock *mptcp_accept(struct sock *sk, int flags, int *err,
 	} else {
 		msk->subflow = new_sock;
 	}
-	inet_sk_state_store(sk, TCP_ESTABLISHED);
+	inet_sk_state_store(new_mptcp_sock->sk, TCP_ESTABLISHED);
 
 	return new_mptcp_sock->sk;
 }
Signature · 1 line
2.20.1
#1 lore raw

Hi Paolo,

Quoted 4 lines · Paolo Abeni

We must update the newly created socket status, not the listener socket.

Fixes cc0d09002896 ("mptcp: Implement MPTCP receive path")

Good catch, thank you for the fix!

Just added in the repo!

- fix: de8f56a9b08849ca7a1b86782de0dab9b1c959fd
- sign-off added: 54cae76d4cfcc093bacc82830bb7c04a5c5a08ef
- no conflicts

Cheers,
Matt

Signature · 5 lines
Matthieu Baerts | R&D Engineer
matthieu.baerts(a)tessares.net
Tessares SA | Hybrid Access Solutions
www.tessares.net
1 Avenue Jean Monnet, 1348 Louvain-la-Neuve, Belgium