wireguard-go
wireguard-go copied to clipboard
Two Handhake initiation releated race-conditions fixed
- Fix race-condition between data TX watchdog timer and handshakes retries timer
- (at the same time) Fix and unify handshake attempts counter usage: now 0 means no HI in progress. Can use that timer to check if and HIs already sent.
- Do not flood new handhake initiations, if HI is already scheduled by somebody else.
Initially those raceconditions were observed on Windows. Also I was able to reproduce them on Linux. Debug and testing was done on Linux. Mac version was untested, but I think it should have the same problem.