summaryrefslogtreecommitdiffhomepage
path: root/src
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
commit5eee1f39032c894e6cb30060fa8bfb7859eff729 (patch)
tree3a024c6d4df09251df979b87f23ae6dc3a17bf23 /src
parent99e4518974d6326c1f4c8d3ea187cd1f147e310a (diff)
receive: always send confirmation, even if queue is empty
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'src')
-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: