summaryrefslogtreecommitdiffhomepage
path: root/device
AgeCommit message (Collapse)Author
2019-10-04uapi: allow preventing creation of new peers when updatingJason A. Donenfeld
This enables race-free updates for wg-dynamic and similar tools. Suggested-by: Thomas Gschwantner <tharre3@gmail.com>
2019-09-08version: bump snapshotJason A. Donenfeld
2019-08-25device: getsockname on linux to determine portJason A. Donenfeld
It turns out Go isn't passing the pointer properly so we wound up with a zero port every time.
2019-08-05version: bump snapshotJason A. Donenfeld
2019-08-05device: drop lock before expiring keysJason A. Donenfeld
2019-08-05uapi: skip peers with invalid keysJason A. Donenfeld
2019-07-18device: do not crash on nil'd bind in windows bindingJason A. Donenfeld
2019-07-11device: immediately rekey all peers after changing device private keyJason A. Donenfeld
Reported-by: Derrick Pallas <derrick@pallas.us>
2019-07-01device: receive: uniform message for source address checkJason A. Donenfeld
2019-07-01device: receive: simplify flush loopJason A. Donenfeld
2019-06-14tun: remove TUN prefix from types to reduce stutter elsewhereMatt Layher
Signed-off-by: Matt Layher <mdlayher@gmail.com>
2019-06-11device: update transfer counters correctlyJason A. Donenfeld
The rule is to always update them to the full packet size minus UDP/IP encapsulation for all authenticated packet types.
2019-06-04device: remove redundant return statementsMatt Layher
More staticcheck fixes: $ staticcheck ./... | grep S1023 device/noise-helpers.go:45:2: redundant return statement (S1023) device/noise-helpers.go:54:2: redundant return statement (S1023) device/noise-helpers.go:64:2: redundant return statement (S1023) Signed-off-by: Matt Layher <mdlayher@gmail.com>
2019-06-04device: use bytes.Equal for equality check, simplify assertEqualMatt Layher
Signed-off-by: Matt Layher <mdlayher@gmail.com>
2019-06-03device, ratelimiter: replace uses of time.Now().Sub() with time.Since()Matt Layher
Simplification found by staticcheck: $ staticcheck ./... | grep S1012 device/cookie.go:90:5: should use time.Since instead of time.Now().Sub (S1012) device/cookie.go:127:5: should use time.Since instead of time.Now().Sub (S1012) device/cookie.go:242:5: should use time.Since instead of time.Now().Sub (S1012) device/noise-protocol.go:304:13: should use time.Since instead of time.Now().Sub (S1012) device/receive.go:82:46: should use time.Since instead of time.Now().Sub (S1012) device/send.go:132:5: should use time.Since instead of time.Now().Sub (S1012) device/send.go:139:5: should use time.Since instead of time.Now().Sub (S1012) device/send.go:235:59: should use time.Since instead of time.Now().Sub (S1012) device/send.go:393:9: should use time.Since instead of time.Now().Sub (S1012) ratelimiter/ratelimiter.go:79:10: should use time.Since instead of time.Now().Sub (S1012) ratelimiter/ratelimiter.go:87:10: should use time.Since instead of time.Now().Sub (S1012) Change applied using: $ find . -type f -name "*.go" -exec sed -i "s/Now().Sub(/Since(/g" {} \; Signed-off-by: Matt Layher <mdlayher@gmail.com>
2019-05-30device: add SendKeepalivesToPeersWithCurrentKeypair for handoverJason A. Donenfeld
2019-05-29device, tun: rearrange code and fix device testsMatt Layher
Signed-off-by: Matt Layher <mdlayher@gmail.com>
2019-05-25device: darwin actually doesn't need bound interfacesJason A. Donenfeld
2019-05-25device: make initiations per second match kernel implementationJason A. Donenfeld
2019-05-24device: timers: add jitter on ack failure reinitiationJason A. Donenfeld
2019-05-17device: fail to give bind if it doesn't existJason A. Donenfeld
2019-05-17version: bump snapshotJason A. Donenfeld
2019-05-14global: regroup all importsJason A. Donenfeld
2019-05-09conn: remove scope when sanity checking IP address formatJason A. Donenfeld
2019-04-18device: send: check packet length before freeing elementJason A. Donenfeld
2019-04-13conn: linux: RTA_MARK has moved to x/sysJason A. Donenfeld
2019-04-09version: put version in right placeJason A. Donenfeld
2019-03-21receive: implement flush semanticsJason A. Donenfeld
2019-03-20uapi: remove unhelpful log messagesJason A. Donenfeld
2019-03-19uapi: report endpoint errorJason A. Donenfeld
2019-03-10uapi: make ipcerror conform to interfaceJason A. Donenfeld
2019-03-07receive: squelch tear down errorJason A. Donenfeld
2019-03-04tun: import mobile particularitiesJason A. Donenfeld
2019-03-04boundif: introduce API for socket bindingJason A. Donenfeld
2019-03-03global: begin modularizationJason A. Donenfeld