Skip to content

Commit

Permalink
mptcp: fix invalid addr occupy 'add_addr_accepted'
Browse files Browse the repository at this point in the history
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]>
Signed-off-by: NipaLocal <nipa@local>
  • Loading branch information
Gang Yan authored and NipaLocal committed Dec 11, 2024
1 parent 1b5592c commit f4e5c57
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions net/mptcp/protocol.c
Original file line number Diff line number Diff line change
Expand Up @@ -2575,6 +2575,10 @@ static void __mptcp_close_subflow(struct sock *sk)
continue;

mptcp_close_ssk(sk, ssk, subflow);

if (READ_ONCE(subflow->remote_id) &&
--msk->pm.add_addr_accepted < mptcp_pm_get_add_addr_accept_max(msk))
WRITE_ONCE(msk->pm.accept_addr, true);
}

}
Expand Down

0 comments on commit f4e5c57

Please sign in to comment.