summaryrefslogtreecommitdiffstatshomepage
path: root/src/timers.c
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2017-05-31 05:32:36 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2017-05-31 14:23:13 +0200
commitfab890e613df4e8814b78b6548c9d9f60d5909f4 (patch)
tree0e1288bcc6d28f55f11147f7658cef8c8c2156d8 /src/timers.c
parenttimers: the completion of a handshake also is on key confirmation (diff)
downloadwireguard-linux-compat-fab890e613df4e8814b78b6548c9d9f60d5909f4.tar.xz
wireguard-linux-compat-fab890e613df4e8814b78b6548c9d9f60d5909f4.zip
timers: reset retry-attempt counter when not retrying
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'src/timers.c')
-rw-r--r--src/timers.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/timers.c b/src/timers.c
index 209fe5a..cd37580 100644
--- a/src/timers.c
+++ b/src/timers.c
@@ -45,7 +45,7 @@ static void expired_retransmit_handshake(unsigned long ptr)
/* We clear the endpoint address src address, in case this is the cause of trouble. */
socket_clear_peer_endpoint_src(peer);
- packet_queue_handshake_initiation(peer);
+ packet_queue_handshake_initiation(peer, true);
}
peer_put(peer);
}
@@ -68,7 +68,7 @@ static void expired_new_handshake(unsigned long ptr)
pr_debug("%s: Retrying handshake with peer %Lu (%pISpfsc) because we stopped hearing back after %d seconds\n", netdev_pub(peer->device)->name, peer->internal_id, &peer->endpoint.addr, (KEEPALIVE_TIMEOUT + REKEY_TIMEOUT) / HZ);
/* We clear the endpoint address src address, in case this is the cause of trouble. */
socket_clear_peer_endpoint_src(peer);
- packet_queue_handshake_initiation(peer);
+ packet_queue_handshake_initiation(peer, false);
peer_put(peer);
}