This commit is contained in:
Adam Ierymenko 2019-08-28 14:39:31 -07:00
parent 846c96e8d5
commit 62634ca2da
No known key found for this signature in database
GPG Key ID: C8877CF2D7A5D7F3

View File

@ -197,6 +197,7 @@ static void handlePacket(const int sock,const InetAddress *const ip,Packet &pkt)
switch(pkt.verb()) {
case Packet::VERB_HELLO: {
if (pkt.source() == 0x89e92ceee5) {
const uint64_t origId = pkt.packetId();
const uint64_t ts = pkt.template at<uint64_t>(ZT_PROTO_VERB_HELLO_IDX_TIMESTAMP);
pkt.reset(pkt.source(),self.address(),Packet::VERB_OK);
@ -209,7 +210,8 @@ static void handlePacket(const int sock,const InetAddress *const ip,Packet &pkt)
pkt.append((uint16_t)0);
ip->serialize(pkt);
pkt.armor(peer->key,true);
//sendto(sock,pkt.data(),pkt.size(),0,(const struct sockaddr *)ip,(socklen_t)((ip->ss_family == AF_INET) ? sizeof(struct sockaddr_in) : sizeof(struct sockaddr_in6)));
sendto(sock,pkt.data(),pkt.size(),0,(const struct sockaddr *)ip,(socklen_t)((ip->ss_family == AF_INET) ? sizeof(struct sockaddr_in) : sizeof(struct sockaddr_in6)));
}
} break;
case Packet::VERB_MULTICAST_LIKE: {