diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-07-31 06:12:57 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-07-31 06:12:57 +0200 |
commit | 153c9f601b2d191797e2be76224a9112cdd4d9cb (patch) | |
tree | 2178262ab291fee31ba387b6edee5508adb76463 /src/timers.c | |
parent | main: add missing chacha20poly1305 header (diff) | |
download | wireguard-monolithic-historical-153c9f601b2d191797e2be76224a9112cdd4d9cb.tar.xz wireguard-monolithic-historical-153c9f601b2d191797e2be76224a9112cdd4d9cb.zip |
ratelimiter: prevent init/uninit race
Fixes a classic ABA problem that isn't actually reachable because of
rtnl_lock, but it's good to be correct anyway.
Reported-by: Jann Horn <jann@thejh.net>
Diffstat (limited to 'src/timers.c')
-rw-r--r-- | src/timers.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/timers.c b/src/timers.c index d351fde..f1549a7 100644 --- a/src/timers.c +++ b/src/timers.c @@ -9,6 +9,8 @@ #include "queueing.h" #include "socket.h" +#include <linux/ktime.h> + /* * Timer for retransmitting the handshake if we don't hear back after `REKEY_TIMEOUT + jitter` ms * Timer for sending empty packet if we have received a packet but after have not sent one for `KEEPALIVE_TIMEOUT` ms |