diff options
-rw-r--r-- | docs/Prevent_Tracking.txt | 3 | ||||
-rw-r--r-- | toxcore/onion_announce.h | 2 | ||||
-rw-r--r-- | toxcore/onion_client.c | 2 |
3 files changed, 4 insertions, 3 deletions
diff --git a/docs/Prevent_Tracking.txt b/docs/Prevent_Tracking.txt index d170103f..86402110 100644 --- a/docs/Prevent_Tracking.txt +++ b/docs/Prevent_Tracking.txt | |||
@@ -117,8 +117,9 @@ Data sent to us: | |||
117 | announce response packet: | 117 | announce response packet: |
118 | [uint8_t packet id (132)][data to send back in response(fixed size)][nonce] | 118 | [uint8_t packet id (132)][data to send back in response(fixed size)][nonce] |
119 | encrypted with the DHT private key of Node D, the public key in the request and the nonce:[[uint8_t is_stored] | 119 | encrypted with the DHT private key of Node D, the public key in the request and the nonce:[[uint8_t is_stored] |
120 | [(32 bytes) ping_id if is_stored is 0, public key that must be used to send data packets if is_stored is not 0][Node_Format * (maximum of 8)]] | 120 | [(32 bytes) ping_id if is_stored is 0 or 2, public key that must be used to send data packets if is_stored is 1][Node_Format * (maximum of 8)]] |
121 | (if the is_stored is not 0, it means the information to reach the client id we are searching for is stored on this node) | 121 | (if the is_stored is not 0, it means the information to reach the client id we are searching for is stored on this node) |
122 | is_stored is 2 as a response to a peer trying to announce himself to tell the peer that he is currently annouced successfully. | ||
122 | 123 | ||
123 | data to route response packet: | 124 | data to route response packet: |
124 | [uint8_t packet id (134)][nonce][temporary just generated public key] | 125 | [uint8_t packet id (134)][nonce][temporary just generated public key] |
diff --git a/toxcore/onion_announce.h b/toxcore/onion_announce.h index f2ba3715..36ffe767 100644 --- a/toxcore/onion_announce.h +++ b/toxcore/onion_announce.h | |||
@@ -25,7 +25,7 @@ | |||
25 | 25 | ||
26 | #include "onion.h" | 26 | #include "onion.h" |
27 | 27 | ||
28 | #define ONION_ANNOUNCE_MAX_ENTRIES 48 | 28 | #define ONION_ANNOUNCE_MAX_ENTRIES 64 |
29 | #define ONION_ANNOUNCE_TIMEOUT 300 | 29 | #define ONION_ANNOUNCE_TIMEOUT 300 |
30 | #define ONION_PING_ID_SIZE crypto_hash_sha256_BYTES | 30 | #define ONION_PING_ID_SIZE crypto_hash_sha256_BYTES |
31 | 31 | ||
diff --git a/toxcore/onion_client.c b/toxcore/onion_client.c index 8f735d6c..ab7958c6 100644 --- a/toxcore/onion_client.c +++ b/toxcore/onion_client.c | |||
@@ -403,7 +403,7 @@ static int client_add_to_list(Onion_Client *onion_c, uint32_t num, const uint8_t | |||
403 | } | 403 | } |
404 | 404 | ||
405 | } else { | 405 | } else { |
406 | if (is_stored == 2) | 406 | if (is_stored >= 2) |
407 | return -1; | 407 | return -1; |
408 | 408 | ||
409 | list_nodes = onion_c->friends_list[num - 1].clients_list; | 409 | list_nodes = onion_c->friends_list[num - 1].clients_list; |