diff options
Diffstat (limited to 'toxcore/DHT.c')
-rw-r--r-- | toxcore/DHT.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/toxcore/DHT.c b/toxcore/DHT.c index 0b212d5b..085f93ed 100644 --- a/toxcore/DHT.c +++ b/toxcore/DHT.c | |||
@@ -527,7 +527,7 @@ static int getnodes(DHT *dht, IP_Port ip_port, uint8_t *public_key, uint8_t *cli | |||
527 | uint8_t plain[sizeof(ping_id) + CLIENT_ID_SIZE]; | 527 | uint8_t plain[sizeof(ping_id) + CLIENT_ID_SIZE]; |
528 | uint8_t encrypt[sizeof(ping_id) + CLIENT_ID_SIZE + ENCRYPTION_PADDING]; | 528 | uint8_t encrypt[sizeof(ping_id) + CLIENT_ID_SIZE + ENCRYPTION_PADDING]; |
529 | uint8_t nonce[crypto_box_NONCEBYTES]; | 529 | uint8_t nonce[crypto_box_NONCEBYTES]; |
530 | random_nonce(nonce); | 530 | new_nonce(nonce); |
531 | 531 | ||
532 | memcpy(plain, &ping_id, sizeof(ping_id)); | 532 | memcpy(plain, &ping_id, sizeof(ping_id)); |
533 | memcpy(plain + sizeof(ping_id), client_id, CLIENT_ID_SIZE); | 533 | memcpy(plain + sizeof(ping_id), client_id, CLIENT_ID_SIZE); |
@@ -572,7 +572,7 @@ static int sendnodes(DHT *dht, IP_Port ip_port, uint8_t *public_key, uint8_t *cl | |||
572 | uint8_t plain[sizeof(ping_id) + Node4_format_size * MAX_SENT_NODES]; | 572 | uint8_t plain[sizeof(ping_id) + Node4_format_size * MAX_SENT_NODES]; |
573 | uint8_t encrypt[sizeof(ping_id) + Node4_format_size * MAX_SENT_NODES + ENCRYPTION_PADDING]; | 573 | uint8_t encrypt[sizeof(ping_id) + Node4_format_size * MAX_SENT_NODES + ENCRYPTION_PADDING]; |
574 | uint8_t nonce[crypto_box_NONCEBYTES]; | 574 | uint8_t nonce[crypto_box_NONCEBYTES]; |
575 | random_nonce(nonce); | 575 | new_nonce(nonce); |
576 | 576 | ||
577 | memcpy(plain, &ping_id, sizeof(ping_id)); | 577 | memcpy(plain, &ping_id, sizeof(ping_id)); |
578 | #ifdef TOX_ENABLE_IPV6 | 578 | #ifdef TOX_ENABLE_IPV6 |