mirror of
https://github.com/octoleo/syncthing.git
synced 2024-11-10 07:11:08 +00:00
8265dac127
The locking protocol in nat.Mapping was racy: * Mapping.addressMap RLock'd, but then returned a map shared between caller and Mapping, so the lock didn't do anything. * Operations inside Service.{verifyExistingMappings,acquireNewMappings} would lock the map for every update, but that means callers to Mapping.ExternalAddresses can be looping over the map while the Service methods are concurrently modifying it. When the Go runtime detects that happening, it panics. * Mapping.expires was read and updated without locking. The Service methods now lock the map once and release the lock only when done. Also, subscribers no longer get the added and removed addresses, because none of them were using the information. This was changed for a previous attempt to retain the fine-grained locking and not reverted because it simplifies the code. |
||
---|---|---|
.. | ||
stcompdirs | ||
stcrashreceiver | ||
stdisco | ||
stdiscosrv | ||
stevents | ||
stfileinfo | ||
stfinddevice | ||
stfindignored | ||
stgenfiles | ||
strelaypoolsrv | ||
strelaysrv | ||
stsigtool | ||
stupgrades | ||
stvanity | ||
stwatchfile | ||
syncthing | ||
uraggregate | ||
ursrv | ||
.gitignore |