Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
mptcp: fix duplicate subflow creation
Fullmesh endpoints could end-up unexpectedly generating duplicate subflows - same local and remote addresses - when multiple incoming ADD_ADDR are processed before the PM creates the subflow for the local endpoints. Address the issue explicitly checking for duplicates at subflow creation time. To avoid a quadratic computational complexity, track the unavailable remote address ids in a temporary bitmap and initialize such bitmap with the remote ids of all the existing subflows matching the local address currently processed. The above allows additionally replacing the existing code checking for duplicate entry in the current set with a simple bit test operation. Fixes: 2843ff6 ("mptcp: remote addresses fullmesh") Closes: multipath-tcp/mptcp_net-next#435 Signed-off-by: Paolo Abeni <[email protected]>
- Loading branch information