[PATCH mptcp-net v6 11/11] mptcp: pm: send ACK on non stale subflows

Matthieu Baerts (NGI0) posted 11 patches 4 months ago
There is a newer version of this series
[PATCH mptcp-net v6 11/11] mptcp: pm: send ACK on non stale subflows
Posted by Matthieu Baerts (NGI0) 4 months ago
If the subflow is considered as "staled", it is better to avoid it to
send an ACK carrying an ADD_ADDR or RM_ADDR. Another subflow, if any,
will then be selected.

Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
---
Notes:
  - It sounds safer to do this modification in -next. I also wonder if
    we should not add more check, e.g. not on backup flow except if
    there are no other non-backup ones, or still pick a staled one if
    there are no others, etc. But maybe we don't need to care for an
    ACK? And we can always improve that later!
---
 net/mptcp/pm_netlink.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/mptcp/pm_netlink.c b/net/mptcp/pm_netlink.c
index d3b1b459e6f3..cb8f7de7ed6c 100644
--- a/net/mptcp/pm_netlink.c
+++ b/net/mptcp/pm_netlink.c
@@ -772,7 +772,7 @@ void mptcp_pm_nl_addr_send_ack(struct mptcp_sock *msk)
 		return;
 
 	mptcp_for_each_subflow(msk, subflow) {
-		if (__mptcp_subflow_active(subflow)) {
+		if (!subflow->stale && __mptcp_subflow_active(subflow)) {
 			mptcp_pm_send_ack(msk, subflow, false, false);
 			break;
 		}

-- 
2.45.2