summaryrefslogtreecommitdiffstatshomepage
path: root/src/receive.c
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2016-10-19 17:20:25 +0900
committerJason A. Donenfeld <Jason@zx2c4.com>2016-10-19 17:22:13 +0900
commitcb8fff55db82c60c0f5bf248afd80546525c838f (patch)
treeb70deb7323c8484a3709f1393adb00a25eb2dce6 /src/receive.c
parenttimers: only have initiator rekey (diff)
downloadwireguard-monolithic-historical-cb8fff55db82c60c0f5bf248afd80546525c838f.tar.xz
wireguard-monolithic-historical-cb8fff55db82c60c0f5bf248afd80546525c838f.zip
receive: always send confirmation, even if queue is empty
Diffstat (limited to 'src/receive.c')
-rw-r--r--src/receive.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/receive.c b/src/receive.c
index 6dda410..307baff 100644
--- a/src/receive.c
+++ b/src/receive.c
@@ -142,7 +142,11 @@ static void receive_handshake_packet(struct wireguard_device *wg, void *data, si
timers_ephemeral_key_created(peer);
timers_handshake_complete(peer);
peer->sent_lastminute_handshake = false;
- packet_send_queue(peer);
+ /* Calling this function will either send any existing packets in the queue
+ * and not send a keepalive, which is the best case, Or, if there's nothing
+ * in the queue, it will send a keepalive, in order to give immediate
+ * confirmation of the session. */
+ packet_send_keepalive(peer);
}
break;
default: