mptcp: pm: do not remove already closed subflows

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Matthieu Baerts (NGI0) <matttbe@xxxxxxxxxx>

commit 58e1b66b4e4b8a602d3f2843e8eba00a969ecce2 upstream.

It is possible to have in the list already closed subflows, e.g. the
initial subflow has been already closed, but still in the list. No need
to try to close it again, and increments the related counters again.

Fixes: 0ee4261a3681 ("mptcp: implement mptcp_pm_remove_subflow")
Cc: stable@xxxxxxxxxxxxxxx
Reviewed-by: Mat Martineau <martineau@xxxxxxxxxx>
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@xxxxxxxxxx>
Signed-off-by: Paolo Abeni <pabeni@xxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 net/mptcp/pm_netlink.c |    2 ++
 1 file changed, 2 insertions(+)

--- a/net/mptcp/pm_netlink.c
+++ b/net/mptcp/pm_netlink.c
@@ -851,6 +851,8 @@ static void mptcp_pm_nl_rm_addr_or_subfl
 			int how = RCV_SHUTDOWN | SEND_SHUTDOWN;
 			u8 id = subflow_get_local_id(subflow);
 
+			if (inet_sk_state_load(ssk) == TCP_CLOSE)
+				continue;
 			if (rm_type == MPTCP_MIB_RMADDR && remote_id != rm_id)
 				continue;
 			if (rm_type == MPTCP_MIB_RMSUBFLOW && !mptcp_local_id_match(msk, id, rm_id))


Patches currently in stable-queue which might be from matttbe@xxxxxxxxxx are

queue-6.6/mptcp-pm-fix-id-0-endp-usage-after-multiple-re-creations.patch
queue-6.6/mptcp-pm-skip-connecting-to-already-established-sf.patch
queue-6.6/mptcp-pm-reuse-id-0-after-delete-and-re-add.patch
queue-6.6/mptcp-pm-add_addr-0-is-not-a-new-address.patch
queue-6.6/mptcp-pm-do-not-remove-already-closed-subflows.patch
queue-6.6/mptcp-pm-send-ack-on-an-active-subflow.patch
queue-6.6/mptcp-pm-reset-mpc-endp-id-when-re-added.patch
queue-6.6/mptcp-close-subflow-when-receiving-tcp-fin.patch
queue-6.6/selftests-mptcp-join-check-re-re-adding-id-0-endp.patch
queue-6.6/selftests-mptcp-join-no-extra-msg-if-no-counter.patch
queue-6.6/selftests-mptcp-join-check-removing-id-0-endpoint.patch
queue-6.6/mptcp-sched-check-both-backup-in-retrans.patch




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux