diff options
author | Jakub Kicinski <kuba@kernel.org> | 2020-10-15 12:43:21 -0700 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2020-10-15 12:43:21 -0700 |
commit | 2295cddf99e3f7c2be2b1160e2f5e53cc35b09be (patch) | |
tree | 2c5a619c8aee5ef68028a65a1c059736b005846b /net/mptcp/protocol.c | |
parent | 346e320cb2103edef709c4466a29140c4a8e527a (diff) | |
parent | 2ecbc1f684482b4ed52447a39903bd9b0f222898 (diff) | |
download | linux-2295cddf99e3f7c2be2b1160e2f5e53cc35b09be.tar.gz linux-2295cddf99e3f7c2be2b1160e2f5e53cc35b09be.tar.bz2 linux-2295cddf99e3f7c2be2b1160e2f5e53cc35b09be.zip |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Minor conflicts in net/mptcp/protocol.h and
tools/testing/selftests/net/Makefile.
In both cases code was added on both sides in the same place
so just keep both.
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/mptcp/protocol.c')
-rw-r--r-- | net/mptcp/protocol.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c index 9816608da452..185dacb39781 100644 --- a/net/mptcp/protocol.c +++ b/net/mptcp/protocol.c @@ -1710,6 +1710,20 @@ static void pm_work(struct mptcp_sock *msk) spin_unlock_bh(&msk->pm.lock); } +static void __mptcp_close_subflow(struct mptcp_sock *msk) +{ + struct mptcp_subflow_context *subflow, *tmp; + + list_for_each_entry_safe(subflow, tmp, &msk->conn_list, node) { + struct sock *ssk = mptcp_subflow_tcp_sock(subflow); + + if (inet_sk_state_load(ssk) != TCP_CLOSE) + continue; + + __mptcp_close_ssk((struct sock *)msk, ssk, subflow, 0); + } +} + static void mptcp_worker(struct work_struct *work) { struct mptcp_sock *msk = container_of(work, struct mptcp_sock, work); @@ -1727,6 +1741,9 @@ static void mptcp_worker(struct work_struct *work) mptcp_clean_una(sk); mptcp_check_data_fin_ack(sk); __mptcp_flush_join_list(msk); + if (test_and_clear_bit(MPTCP_WORK_CLOSE_SUBFLOW, &msk->flags)) + __mptcp_close_subflow(msk); + __mptcp_move_skbs(msk); if (msk->pm.status) |