summaryrefslogtreecommitdiff
path: root/core/ping.c
diff options
context:
space:
mode:
Diffstat (limited to 'core/ping.c')
-rw-r--r--core/ping.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/ping.c b/core/ping.c
index 4bb9c38a..55d4d261 100644
--- a/core/ping.c
+++ b/core/ping.c
@@ -128,7 +128,7 @@ int send_ping_request(void *ping, Net_Crypto *c, IP_Port ipp, clientid_t *client
128 // Generate random ping_id 128 // Generate random ping_id
129 ping_id = add_ping(ping, ipp); 129 ping_id = add_ping(ping, ipp);
130 130
131 pk.magic = PACKET_PING_REQ; 131 pk.packet_id = NET_PACKET_PING_REQUEST;
132 id_cpy(&pk.client_id, (clientid_t *)c->self_public_key); // Our pubkey 132 id_cpy(&pk.client_id, (clientid_t *)c->self_public_key); // Our pubkey
133 random_nonce((uint8_t *) &pk.nonce); // Generate random nonce 133 random_nonce((uint8_t *) &pk.nonce); // Generate random nonce
134 134
@@ -153,7 +153,7 @@ int send_ping_response(Net_Crypto *c, IP_Port ipp, clientid_t *client_id, uint64
153 if (id_eq(client_id, (clientid_t *)c->self_public_key)) 153 if (id_eq(client_id, (clientid_t *)c->self_public_key))
154 return 1; 154 return 1;
155 155
156 pk.magic = PACKET_PING_RES; 156 pk.packet_id = NET_PACKET_PING_RESPONSE;
157 id_cpy(&pk.client_id, (clientid_t *)c->self_public_key); // Our pubkey 157 id_cpy(&pk.client_id, (clientid_t *)c->self_public_key); // Our pubkey
158 random_nonce((uint8_t *) &pk.nonce); // Generate random nonce 158 random_nonce((uint8_t *) &pk.nonce); // Generate random nonce
159 159