From 62634ca2da2cc44e04487707cb1566fd8c2f29ba Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Wed, 28 Aug 2019 14:39:31 -0700 Subject: [PATCH] . --- root/root.cpp | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/root/root.cpp b/root/root.cpp index 598cd85f1..2fa4a993d 100644 --- a/root/root.cpp +++ b/root/root.cpp @@ -197,19 +197,21 @@ static void handlePacket(const int sock,const InetAddress *const ip,Packet &pkt) switch(pkt.verb()) { case Packet::VERB_HELLO: { - const uint64_t origId = pkt.packetId(); - const uint64_t ts = pkt.template at(ZT_PROTO_VERB_HELLO_IDX_TIMESTAMP); - pkt.reset(pkt.source(),self.address(),Packet::VERB_OK); - pkt.append((uint8_t)Packet::VERB_HELLO); - pkt.append(origId); - pkt.append(ts); - pkt.append((uint8_t)ZT_PROTO_VERSION); - pkt.append((uint16_t)1); - pkt.append((uint16_t)9); - 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))); + if (pkt.source() == 0x89e92ceee5) { + const uint64_t origId = pkt.packetId(); + const uint64_t ts = pkt.template at(ZT_PROTO_VERB_HELLO_IDX_TIMESTAMP); + pkt.reset(pkt.source(),self.address(),Packet::VERB_OK); + pkt.append((uint8_t)Packet::VERB_HELLO); + pkt.append(origId); + pkt.append(ts); + pkt.append((uint8_t)ZT_PROTO_VERSION); + pkt.append((uint16_t)1); + pkt.append((uint16_t)9); + 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))); + } } break; case Packet::VERB_MULTICAST_LIKE: {