Skip to content

Commit

Permalink
mptcp: pm: send ACK on an active subflow
Browse files Browse the repository at this point in the history
commit c07cc3e upstream.

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: [email protected]
Reviewed-by: Mat Martineau <[email protected]>
Signed-off-by: Matthieu Baerts (NGI0) <[email protected]>
Signed-off-by: Paolo Abeni <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
matttbe authored and gregkh committed Sep 4, 2024
1 parent 3415a1a commit 42e7e0a
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions net/mptcp/pm_netlink.c
Original file line number Diff line number Diff line change
Expand Up @@ -768,9 +768,12 @@ void mptcp_pm_nl_addr_send_ack(struct mptcp_sock *msk)
!mptcp_pm_should_rm_signal(msk))
return;

subflow = list_first_entry_or_null(&msk->conn_list, typeof(*subflow), node);
if (subflow)
mptcp_pm_send_ack(msk, subflow, false, false);
mptcp_for_each_subflow(msk, subflow) {
if (__mptcp_subflow_active(subflow)) {
mptcp_pm_send_ack(msk, subflow, false, false);
break;
}
}
}

int mptcp_pm_nl_mp_prio_send_ack(struct mptcp_sock *msk,
Expand Down

0 comments on commit 42e7e0a

Please sign in to comment.