Commit graph

24 commits

Author SHA1 Message Date
Jason A. Donenfeld 5be541d147 global: fix up copyright headers 2018-09-16 18:49:19 +02:00
Jason A. Donenfeld 1d7845a600 Fix typo in timers 2018-05-27 22:55:15 +02:00
Jason A. Donenfeld acb5481246 Fix data races in timers 2018-05-20 06:50:07 +02:00
Jason A. Donenfeld 7c21a3de0a Fix race in lock pending 2018-05-20 03:31:27 +02:00
Jason A. Donenfeld 5a267f0b8c timers: no need to clear keepalive in persistent keepalive
We do this after sending the keepalive anyway.

This is something of a regression, though, since before we'd cancel and
then send, but now we send and then cancel, so it introduces a potential
race, but hopefully that isn't too big of a deal.

Kernel module commit a24b3e6e15ae1ea1291666e5da910caf43eedbaf
2018-05-19 02:40:22 +02:00
Jason A. Donenfeld 870734ab5e timers: clear send_keepalive timer on sending handshake response
We reorganize this into also doing so on sending keepalives itself,
which means the state machine is much more consistent, even if this was
already implied.

Kernel module commit 30290ef1d2581a3e6ee8ffcdb05d580cfba976be
2018-05-19 02:40:22 +02:00
Jason A. Donenfeld 207fd644e8 Lock timers on modification 2018-05-15 18:44:00 +02:00
Jason A. Donenfeld b56af1829d More refactoring 2018-05-13 23:20:13 +02:00
Jason A. Donenfeld 2c27ab205c Rework index hashtable 2018-05-13 18:26:09 +02:00
Jason A. Donenfeld 233f079a94 Rewrite timers and related state machines 2018-05-10 16:08:03 +02:00
Mathias Hall-Andersen abe2651ad5 Removed remaining signals from peer
1. Removed remaining signals from peer struct
2. Made needAnotherKeepalive local
3. Removed environment check from warning text (annoying when debugging)
2018-05-05 22:07:58 +02:00
Mathias Hall-Andersen 8ba28be732 Use Int32n for jitter 2018-05-05 04:42:17 +02:00
Mathias Hall-Andersen 7a83f2565a Removed old signals 2018-05-05 04:15:07 +02:00
Mathias Hall-Andersen edbce6b400 Merge branch 'master' of ssh://git.zx2c4.com/wireguard-go 2018-05-05 02:23:03 +02:00
Mathias Hall-Andersen 6db41d5a26 Initial version of migration to new event model
- Begin move away from global timer state.
- Made logging format more consistent
2018-05-05 02:20:52 +02:00
Jason A. Donenfeld a040786645 global: Add SPDX tags and copyright header
Mathias should probably add his copyright headers to each file too.
2018-05-03 15:06:25 +02:00
Jason A. Donenfeld 168ef61a63 Add missing locks and fix debug output, and try to flush queues
Flushing queues on exit is sort of a partial solution, but this could be
better. Really what we want is for no more packets to be enqueued after
isUp is set to false.
2018-05-01 17:46:28 +02:00
Mathias Hall-Andersen ac9912345b Fixed read from closed channel
A premature waitgroup .Done resulted in reading from closed channel.
This caused a nil-pointer deref & crash.

Added additional debugging when closing routines.
2018-04-18 20:29:48 +02:00
Jason A. Donenfeld eb6728400b Use simple 16-bit integer for persistent keepalive
Races for this aren't a huge problem.
2018-04-18 07:24:33 +02:00
Mathias Hall-Andersen 6cba91999c TUN status hack was causing spam during shutdown 2018-02-11 23:26:54 +01:00
Mathias Hall-Andersen 5f0a91a127 Moved ratelimiter to internal package 2018-02-11 22:53:39 +01:00
Mathias Hall-Andersen 743364f647 Fixed tabs 2018-02-11 19:02:50 +01:00
Mathias Hall-Andersen ceccd39420 Work on logging format 2018-02-04 19:18:44 +01:00
Mathias Hall-Andersen a0f54cbe5a Align with go library layout 2018-02-04 16:08:26 +01:00
Renamed from src/timers.go (Browse further)