mptcp: subflow: check parent mptcp socket on subflow state change
This is needed at least until proper MPTCP-Level fin/reset signalling gets added: We wake parent when a subflow changes, but we should do this only when all subflows have closed, not just one. Schedule the mptcp worker and tell it to check eof state on all subflows. Only flag mptcp socket as closed and wake userspace processes blocking in poll if all subflows have closed. Co-developed-by: Paolo Abeni <pabeni@redhat.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com> Signed-off-by: Florian Westphal <fw@strlen.de> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
0b4f33def7
commit
59832e2465
@@ -994,8 +994,7 @@ static void subflow_state_change(struct sock *sk)
|
||||
if (!(parent->sk_shutdown & RCV_SHUTDOWN) &&
|
||||
!subflow->rx_eof && subflow_is_done(sk)) {
|
||||
subflow->rx_eof = 1;
|
||||
parent->sk_shutdown |= RCV_SHUTDOWN;
|
||||
__subflow_state_change(parent);
|
||||
mptcp_subflow_eof(parent);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user