mirror of
https://github.com/tailscale/tailscale.git
synced 2026-09-16 07:52:22 -04:00
invalidateMappingsLocked() makes network requests to invalidate any active port mappings. Releasing NAT-PMP and PCP mappings never blocks, but UPnP mappings did block and a slow/non-responding router could deadlock this code. Since these invalidations are supposed to be best-effort fire-and- forget, there is no reason to block on them. Calling Release() in a separate goroutine means that we can immediately forget the old mappings and release the lock. Fixes https://github.com/tailscale/corp/issues/33619 Change-Id: I6d8e53aa104416bc2c63809381f798568353ba7f Signed-off-by: Francois Marier <francois@tailscale.com>