mirror of
https://github.com/juanfont/headscale.git
synced 2025-08-25 10:01:46 +00:00
Lock allocation of IP address
current logic is not safe as it will allow an IP that isnt persisted to the DB to be given out multiple times if machines joins in quick succession. This adds a lock around the "get ip" and machine registration and save to DB so we ensure thiis isnt happning. Currently this had to be done three places, which is silly, and outlined in #294.
This commit is contained in:
Reference in New Issue
Block a user