mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-01-22 04:18:45 +00:00
.
This commit is contained in:
parent
846c96e8d5
commit
62634ca2da
@ -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: {
|
||||
|
Loading…
Reference in New Issue
Block a user