mptcp: Wake up MPTCP worker when DATA_FIN found on a TCP FIN packet
authorMat Martineau <mathew.j.martineau@linux.intel.com>
Mon, 21 Sep 2020 14:57:58 +0000 (16:57 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 24 Sep 2020 00:30:52 +0000 (17:30 -0700)
commitef59b1953c26130ef23e6986b2ceea1efaa472e9
treeedea50dfc47d05ea49c335c813ec11fafcbf1b04
parent805c6d3c19210c90c109107d189744e960eae025
mptcp: Wake up MPTCP worker when DATA_FIN found on a TCP FIN packet

When receiving a DATA_FIN MPTCP option on a TCP FIN packet, the DATA_FIN
information would be stored but the MPTCP worker did not get
scheduled. In turn, the MPTCP socket state would remain in
TCP_ESTABLISHED and no blocked operations would be awakened.

TCP FIN packets are seen by the MPTCP socket when moving skbs out of the
subflow receive queues, so schedule the MPTCP worker when a skb with
DATA_FIN but no data payload is moved from a subflow queue. Other cases
(DATA_FIN on a bare TCP ACK or on a packet with data payload) are
already handled.

Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/84
Fixes: 43b54c6ee382 ("mptcp: Use full MPTCP-level disconnect state machine")
Acked-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/mptcp/subflow.c