Skip to content

Commit 5b21443

Browse files
Dwyane-Yanintel-lab-lkp
authored andcommitted
mptcp: fix invalid addr occupy 'add_addr_accepted'
This patch fixes an issue where an invalid address is announce as a signal, the 'add_addr_accepted' is incorrectly added several times when 'retransmit ADD_ADDR'. So we need to update this variable when the connection is removed from conn_list by mptcp_worker. So that the available address can be added in time. In fact, the 'add_addr_accepted' is only declined when 'RM_ADDR' by now, so when subflows are getting closed from the other peer, the new signal is not accepted as well. We noticed there have exist some problems related to this.I think this patch effectively resolves them. Closes: multipath-tcp/mptcp_net-next#498 Signed-off-by: Gang Yan <[email protected]>
1 parent e537fe4 commit 5b21443

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

net/mptcp/protocol.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2575,6 +2575,10 @@ static void __mptcp_close_subflow(struct sock *sk)
25752575
continue;
25762576

25772577
mptcp_close_ssk(sk, ssk, subflow);
2578+
2579+
if (READ_ONCE(subflow->remote_id) &&
2580+
--msk->pm.add_addr_accepted < mptcp_pm_get_add_addr_accept_max(msk))
2581+
WRITE_ONCE(msk->pm.accept_addr, true);
25782582
}
25792583

25802584
}

0 commit comments

Comments
 (0)