aboutsummaryrefslogtreecommitdiffstats
path: root/device/peer.go (follow)
Commit message (Collapse)AuthorAgeFilesLines
* device: add write queue mutex for peerHaichao Liu2020-11-181-1/+5
| | | | | | | fix panic: send on closed channel when remove peer Signed-off-by: Haichao Liu <liuhaichao@bytedance.com> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* device: format a few thingsJason A. Donenfeld2020-11-061-1/+0
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* device: remove global for roaming escape hatchJason A. Donenfeld2020-10-141-2/+2
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* global: update header comments and modulesJason A. Donenfeld2020-05-021-1/+1
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* device: use atomic access for unlocked keypair.nextJason A. Donenfeld2020-05-021-3/+3
| | | | | | | | | Go's GC semantics might not always guarantee the safety of this, and the race detector gets upset too, so instead we wrap this all in atomic accessors. Reported-by: David Anderson <danderson@tailscale.com> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* conn: introduce new package that splits out the Bind and Endpoint typesDavid Crawshaw2020-05-021-2/+4
| | | | | | | | | | The sticky socket code stays in the device package for now, as it reaches deeply into the peer list. This is the first step in an effort to split some code out of the very busy device package. Signed-off-by: David Crawshaw <crawshaw@tailscale.com>
* device: add test to ensure Peer fields are safe for atomic access on 32-bitDavid Anderson2020-05-021-1/+5
| | | | | | | | | Adds a test that will fail consistently on 32-bit platforms if the struct ever changes again to violate the rules. This is likely not needed because unaligned access crashes reliably, but this will reliably fail even if tests accidentally pass due to lucky alignment. Signed-Off-By: David Anderson <danderson@tailscale.com>
* noise: unify zero checking of ecdhJason A. Donenfeld2020-03-171-7/+2
|
* uapi: skip peers with invalid keysJason A. Donenfeld2019-08-051-3/+10
|
* device: immediately rekey all peers after changing device private keyJason A. Donenfeld2019-07-111-0/+19
| | | | Reported-by: Derrick Pallas <derrick@pallas.us>
* device: update transfer counters correctlyJason A. Donenfeld2019-06-111-1/+6
| | | | | The rule is to always update them to the full packet size minus UDP/IP encapsulation for all authenticated packet types.
* boundif: introduce API for socket bindingJason A. Donenfeld2019-03-041-2/+2
|
* global: begin modularizationJason A. Donenfeld2019-03-031-0/+270