mirror of
https://github.com/tailscale/tailscale.git
synced 2026-02-14 20:21:03 +01:00
This moves the info and localUser of a conn under the guard of the conn's mu in order to prevent races between the fields being written in clientAuth and it being read. Given that info and localUser are pointers this doesn't strictly prevent individual fields from being written without the mutex being held. The reason I consider that good enough is that the code effectively treats both fields as immutable once set. I have added defensive nil checks everywhere, however, which might be overly conservative. Updates tailscale/corp#36268 Signed-off-by: Gesa Stupperich <gesa@tailscale.com>