diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2016-10-19 15:46:28 +0900 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2016-10-19 17:22:13 +0900 |
commit | 09847c27d4b9af8ce296215ed270ebfb4d08b23c (patch) | |
tree | 3465992e6488c7b685a166e08387ddebeb53604d /src/peer.h | |
parent | timers: always delay handshakes for responder (diff) | |
download | wireguard-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.h | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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; |