Skip to content

Commit c07cc3e

Browse files
matttbePaolo Abeni
authored andcommitted
mptcp: pm: send ACK on an active subflow
Taking the first one on the list doesn't work in some cases, e.g. if the initial subflow is being removed. Pick another one instead of not sending anything. Fixes: 84dfe36 ("mptcp: send out dedicated ADD_ADDR packet") Cc: stable@vger.kernel.org Reviewed-by: Mat Martineau <martineau@kernel.org> Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
1 parent 5f94b08 commit c07cc3e

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

net/mptcp/pm_netlink.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -765,9 +765,12 @@ void mptcp_pm_nl_addr_send_ack(struct mptcp_sock *msk)
765765
!mptcp_pm_should_rm_signal(msk))
766766
return;
767767

768-
subflow = list_first_entry_or_null(&msk->conn_list, typeof(*subflow), node);
769-
if (subflow)
770-
mptcp_pm_send_ack(msk, subflow, false, false);
768+
mptcp_for_each_subflow(msk, subflow) {
769+
if (__mptcp_subflow_active(subflow)) {
770+
mptcp_pm_send_ack(msk, subflow, false, false);
771+
break;
772+
}
773+
}
771774
}
772775

773776
int mptcp_pm_nl_mp_prio_send_ack(struct mptcp_sock *msk,

0 commit comments

Comments
 (0)