diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2016-11-10 23:28:35 +0100 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2016-11-15 02:42:36 +0100 |
commit | 032d0526c9b52d1391fc14fa532ef5162e4c1822 (patch) | |
tree | 0b93b6b25bdfc10632e4c6c4d065c659eb623106 /src/timers.c | |
parent | 450e45d9570450e6a10323902e4198c30cd312a0 (diff) |
socket: keep track of src address in sending packets
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'src/timers.c')
-rw-r--r-- | src/timers.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/timers.c b/src/timers.c index 8cc2104..f002a65 100644 --- a/src/timers.c +++ b/src/timers.c @@ -27,7 +27,7 @@ static inline unsigned long slack_time(unsigned long time) static void expired_retransmit_handshake(unsigned long ptr) { peer_get_from_ptr(ptr); - pr_debug("Handshake for peer %Lu (%pISpfsc) did not complete after %d seconds, retrying\n", peer->internal_id, &peer->endpoint_addr, REKEY_TIMEOUT / HZ); + pr_debug("Handshake for peer %Lu (%pISpfsc) did not complete after %d seconds, retrying\n", peer->internal_id, &peer->endpoint.addr_storage, REKEY_TIMEOUT / HZ); if (peer->timer_handshake_attempts > MAX_TIMER_HANDSHAKES) { del_timer(&peer->timer_send_keepalive); /* We remove all existing packets and don't try again, @@ -59,7 +59,7 @@ static void expired_send_keepalive(unsigned long ptr) static void expired_new_handshake(unsigned long ptr) { peer_get_from_ptr(ptr); - pr_debug("Retrying handshake with peer %Lu (%pISpfsc) because we stopped hearing back after %d seconds\n", peer->internal_id, &peer->endpoint_addr, (KEEPALIVE_TIMEOUT + REKEY_TIMEOUT) / HZ); + pr_debug("Retrying handshake with peer %Lu (%pISpfsc) because we stopped hearing back after %d seconds\n", peer->internal_id, &peer->endpoint.addr_storage, (KEEPALIVE_TIMEOUT + REKEY_TIMEOUT) / HZ); packet_queue_handshake_initiation(peer); peer_put(peer); } @@ -73,7 +73,7 @@ static void expired_kill_ephemerals(unsigned long ptr) static void queued_expired_kill_ephemerals(struct work_struct *work) { struct wireguard_peer *peer = container_of(work, struct wireguard_peer, clear_peer_work); - pr_debug("Zeroing out all keys for peer %Lu (%pISpfsc), since we haven't received a new one in %d seconds\n", peer->internal_id, &peer->endpoint_addr, (REJECT_AFTER_TIME * 3) / HZ); + pr_debug("Zeroing out all keys for peer %Lu (%pISpfsc), since we haven't received a new one in %d seconds\n", peer->internal_id, &peer->endpoint.addr_storage, (REJECT_AFTER_TIME * 3) / HZ); noise_handshake_clear(&peer->handshake); noise_keypairs_clear(&peer->keypairs); peer_put(peer); |