From a425bbc67301bf486fe5b0aba8adb59ae791403e Mon Sep 17 00:00:00 2001 From: Kees Bos Date: Wed, 6 May 2015 12:05:20 +0200 Subject: Renamed supernode to rootserver --- node/IncomingPacket.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'node/IncomingPacket.cpp') diff --git a/node/IncomingPacket.cpp b/node/IncomingPacket.cpp index 8b228de5..5c83f24f 100644 --- a/node/IncomingPacket.cpp +++ b/node/IncomingPacket.cpp @@ -110,7 +110,7 @@ bool IncomingPacket::_doERROR(const RuntimeEnvironment *RR,const SharedPtr case Packet::ERROR_OBJ_NOT_FOUND: if (inReVerb == Packet::VERB_WHOIS) { - if (RR->topology->isSupernode(peer->address())) + if (RR->topology->isRootserver(peer->address())) RR->sw->cancelWhoisRequest(Address(field(ZT_PROTO_VERB_ERROR_IDX_PAYLOAD,ZT_ADDRESS_LENGTH),ZT_ADDRESS_LENGTH)); } else if (inReVerb == Packet::VERB_NETWORK_CONFIG_REQUEST) { SharedPtr network(RR->node->network(at(ZT_PROTO_VERB_ERROR_IDX_PAYLOAD))); @@ -128,7 +128,7 @@ bool IncomingPacket::_doERROR(const RuntimeEnvironment *RR,const SharedPtr break; case Packet::ERROR_IDENTITY_COLLISION: - if (RR->topology->isSupernode(peer->address())) + if (RR->topology->isRootserver(peer->address())) RR->node->postEvent(ZT1_EVENT_FATAL_ERROR_IDENTITY_COLLISION); break; @@ -268,7 +268,7 @@ bool IncomingPacket::_doHELLO(const RuntimeEnvironment *RR) peer->setRemoteVersion(protoVersion,vMajor,vMinor,vRevision); bool trusted = false; - if (RR->topology->isSupernode(id.address())) { + if (RR->topology->isRootserver(id.address())) { RR->node->postNewerVersionIfNewer(vMajor,vMinor,vRevision); trusted = true; } @@ -353,7 +353,7 @@ bool IncomingPacket::_doOK(const RuntimeEnvironment *RR,const SharedPtr &p peer->setRemoteVersion(vProto,vMajor,vMinor,vRevision); bool trusted = false; - if (RR->topology->isSupernode(peer->address())) { + if (RR->topology->isRootserver(peer->address())) { RR->node->postNewerVersionIfNewer(vMajor,vMinor,vRevision); trusted = true; } @@ -362,10 +362,10 @@ bool IncomingPacket::_doOK(const RuntimeEnvironment *RR,const SharedPtr &p } break; case Packet::VERB_WHOIS: { - // Right now only supernodes are allowed to send OK(WHOIS) to prevent + // Right now only rootservers are allowed to send OK(WHOIS) to prevent // poisoning attacks. Further decentralization will require some other // kind of trust mechanism. - if (RR->topology->isSupernode(peer->address())) { + if (RR->topology->isRootserver(peer->address())) { const Identity id(*this,ZT_PROTO_VERB_WHOIS__OK__IDX_IDENTITY); if (id.locallyValidate()) RR->sw->doAnythingWaitingForPeer(RR->topology->addPeer(SharedPtr(new Peer(RR->identity,id)))); -- cgit v1.2.3 From 87bb0086deadf3663c3e0ec1308e0d71a6473362 Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Wed, 17 Jun 2015 12:46:12 -0700 Subject: Almost certain fix for GitHub issue #184 on -dev --- node/IncomingPacket.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'node/IncomingPacket.cpp') diff --git a/node/IncomingPacket.cpp b/node/IncomingPacket.cpp index 5c83f24f..8f95b9ba 100644 --- a/node/IncomingPacket.cpp +++ b/node/IncomingPacket.cpp @@ -689,6 +689,7 @@ bool IncomingPacket::_doNETWORK_CONFIG_REQUEST(const RuntimeEnvironment *RR,cons outp.append((uint16_t)netconfStr.length()); outp.append(netconfStr.data(),(unsigned int)netconfStr.length()); outp.compress(); + outp.armor(peer->key(),true); if (outp.size() > ZT_PROTO_MAX_PACKET_LENGTH) { TRACE("NETWORK_CONFIG_REQUEST failed: internal error: netconf size %u is too large",(unsigned int)netconfStr.length()); } else { -- cgit v1.2.3