mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
net_crypto now works again on pure UDP.
This commit is contained in:
parent
60ed415a5a
commit
b5f84b33f7
|
@ -414,8 +414,8 @@ static int send_packet_to(Net_Crypto *c, int crypt_connection_id, uint8_t *data,
|
||||||
if (direct_connected && (uint32_t)sendpacket(c->dht->net, conn->ip_port, data, length) == length)
|
if (direct_connected && (uint32_t)sendpacket(c->dht->net, conn->ip_port, data, length) == length)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if (length < 96
|
//TODO: a better way of sending packets directly to confirm the others ip.
|
||||||
|| data[0] == NET_PACKET_CRYPTO_HS) //TODO: a better way of sending packets directly to confirm the others ip.
|
if (length < 96 || data[0] == NET_PACKET_COOKIE_REQUEST || data[0] == NET_PACKET_CRYPTO_HS)
|
||||||
sendpacket(c->dht->net, conn->ip_port, data, length);
|
sendpacket(c->dht->net, conn->ip_port, data, length);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user