Skip to content

Commit 843b5e7

Browse files
Paolo Abenidavem330
authored andcommitted
mptcp: fix local endpoint accounting
In mptcp_pm_nl_rm_addr_or_subflow() we always mark as available the id corresponding to the just removed address. The used bitmap actually tracks only the local IDs: we must restrict the operation when a (local) subflow is removed. Fixes: a88c9e4 ("mptcp: do not block subflows creation on errors") Signed-off-by: Paolo Abeni <[email protected]> Signed-off-by: Mat Martineau <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent ca188a2 commit 843b5e7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

net/mptcp/pm_netlink.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -807,7 +807,8 @@ static void mptcp_pm_nl_rm_addr_or_subflow(struct mptcp_sock *msk,
807807
removed = true;
808808
__MPTCP_INC_STATS(sock_net(sk), rm_type);
809809
}
810-
__set_bit(rm_list->ids[i], msk->pm.id_avail_bitmap);
810+
if (rm_type == MPTCP_MIB_RMSUBFLOW)
811+
__set_bit(rm_list->ids[i], msk->pm.id_avail_bitmap);
811812
if (!removed)
812813
continue;
813814

0 commit comments

Comments
 (0)