mirror of
https://github.com/tailscale/tailscale.git
synced 2026-11-20 08:41:19 -08:00
The datapath resolved a Magic IP to its Transit IP and then, in a second lock acquisition, counted the new flow against the assignment holding that Transit IP. A concurrent reserveAddresses could expire the assignment in between and hand the Transit IP to an unrelated destination, so the flow was installed DNATing to an address another destination now owned, counted against that stranger's assignment. Merge the two steps into ClientFlowCreatedForMagicIP, which resolves and counts under one c.mu acquisition. Fixes https://github.com/tailscale/corp/issues/44273 Change-Id: Iefae902267fd06a5d2c965a3570b6977921be76f Signed-off-by: Mazdak Nasab <[email protected]>