aboutsummaryrefslogtreecommitdiffstats
path: root/device/device.go (follow)
Commit message (Collapse)AuthorAgeFilesLines
* device: wait for routines to stop before removing peersDmytro Shynkevych2020-07-041-1/+1
| | | | | | | | | | | | | | | Peers are currently removed after Device's goroutines are signaled to stop, but without waiting for them to actually do so, which is racy. For example, RoutineHandshake may be in Peer.SendKeepalive when the corresponding peer is removed, which closes its nonce channel. This causes a send on a closed channel, as observed in tailscale/tailscale#487. This patch seems to be the correct synchronizing action: Peer's goroutines are receivers and handle channel closure gracefully, so Device's goroutines are the ones that should be fully stopped first. Signed-Off-By: Dmytro Shynkevych <dmytro@tailscale.com>
* device: export Bind and remove socketfd shims for androidDavid Crawshaw2020-06-221-0/+6
| | | | Signed-off-by: David Crawshaw <crawshaw@tailscale.com>
* global: update header comments and modulesJason A. Donenfeld2020-05-021-1/+1
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* conn: introduce new package that splits out the Bind and Endpoint typesDavid Crawshaw2020-05-021-10/+136
| | | | | | | | | | 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>
* noise: unify zero checking of ecdhJason A. Donenfeld2020-03-171-3/+0
|
* device: fix private key removal logicJason A. Donenfeld2020-02-041-13/+4
|
* device: drop lock before expiring keysJason A. Donenfeld2019-08-051-4/+11
|
* device: immediately rekey all peers after changing device private keyJason A. Donenfeld2019-07-111-0/+6
| | | | Reported-by: Derrick Pallas <derrick@pallas.us>
* tun: remove TUN prefix from types to reduce stutter elsewhereMatt Layher2019-06-141-3/+2
| | | | Signed-off-by: Matt Layher <mdlayher@gmail.com>
* device: add SendKeepalivesToPeersWithCurrentKeypair for handoverJason A. Donenfeld2019-05-301-0/+17
|
* device: fail to give bind if it doesn't existJason A. Donenfeld2019-05-171-0/+1
|
* global: regroup all importsJason A. Donenfeld2019-05-141-2/+3
|
* global: begin modularizationJason A. Donenfeld2019-03-031-0/+396