aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/peer.h
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2016-10-19 15:46:28 +0900
committerJason A. Donenfeld <Jason@zx2c4.com>2016-10-19 17:22:13 +0900
commit09847c27d4b9af8ce296215ed270ebfb4d08b23c (patch)
tree3465992e6488c7b685a166e08387ddebeb53604d /src/peer.h
parenttimers: always delay handshakes for responder (diff)
downloadwireguard-monolithic-historical-09847c27d4b9af8ce296215ed270ebfb4d08b23c.tar.xz
wireguard-monolithic-historical-09847c27d4b9af8ce296215ed270ebfb4d08b23c.zip
timers: only have initiator rekey
If it's time to rekey, and the responder sends a message, the initator will begin the rekeying when sending his response message. In the worst case, this response message will actually just be the keepalive. This generally works well, with the one edge case of the message arriving less than 10 seconds before key expiration, in which the keepalive is not sufficient. In this case, we simply rehandshake immediately.
Diffstat (limited to 'src/peer.h')
-rw-r--r--src/peer.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/peer.h b/src/peer.h
index 6eb6224..306f9b3 100644
--- a/src/peer.h
+++ b/src/peer.h
@@ -29,11 +29,12 @@ struct wireguard_peer {
struct cookie latest_cookie;
struct hlist_node pubkey_hash;
uint64_t rx_bytes, tx_bytes;
- struct timer_list timer_retransmit_handshake, timer_delay_handshake, timer_send_keepalive, timer_new_handshake, timer_kill_ephemerals, timer_persistent_keepalive;
+ struct timer_list timer_retransmit_handshake, timer_send_keepalive, timer_new_handshake, timer_kill_ephemerals, timer_persistent_keepalive;
unsigned int timer_handshake_attempts;
unsigned long persistent_keepalive_interval;
bool timer_need_another_keepalive;
bool need_resend_queue;
+ bool sent_lastminute_handshake;
struct timeval walltime_last_handshake;
struct sk_buff_head tx_packet_queue;
struct kref refcount;