From 2f00ae4fd7dc018898684e07311390af7da7d4c3 Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Mon, 21 Oct 2013 14:22:02 -0400 Subject: [PATCH] Version 0.6.1: minor bug fix, DBM removal This version removes the peer DBM present in earlier releases. It is not necessary for regular clients and has been a source of problems. There is a long-term identity cache that can be enabled by making a directory called "iddb.d" in the home folder and restarting ZT1. This is probably something only our supernodes would need, since regular nodes can easily WHOIS peers they've forgotten about. On shutdown, the peer database is dumped to disk. It's then restored on startup. Peers that have not been used in a while are cleaned out, so this keeps this data set small. A DBM may re-appear later if it's needed, but for now it was YAGNI. --- node/PacketDecoder.cpp | 6 +++--- version.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/node/PacketDecoder.cpp b/node/PacketDecoder.cpp index f65e41675..9f348bedf 100644 --- a/node/PacketDecoder.cpp +++ b/node/PacketDecoder.cpp @@ -305,12 +305,12 @@ bool PacketDecoder::_doOK(const RuntimeEnvironment *_r,const SharedPtr &pe bool PacketDecoder::_doWHOIS(const RuntimeEnvironment *_r,const SharedPtr &peer) { if (payloadLength() == ZT_ADDRESS_LENGTH) { - SharedPtr p(_r->topology->getPeer(Address(payload(),ZT_ADDRESS_LENGTH))); - if (p) { + Identity id(_r->topology->getIdentity(Address(payload(),ZT_ADDRESS_LENGTH))); + if (id) { Packet outp(source(),_r->identity.address(),Packet::VERB_OK); outp.append((unsigned char)Packet::VERB_WHOIS); outp.append(packetId()); - p->identity().serialize(outp,false); + id.serialize(outp,false); outp.armor(peer->key(),true); _r->demarc->send(_localPort,_remoteAddress,outp.data(),outp.size(),-1); //TRACE("sent WHOIS response to %s for %s",source().toString().c_str(),Address(payload(),ZT_ADDRESS_LENGTH).toString().c_str()); diff --git a/version.h b/version.h index f1f9011ae..44ec2c566 100644 --- a/version.h +++ b/version.h @@ -41,6 +41,6 @@ /** * Revision: 16-bit (0-65535) */ -#define ZEROTIER_ONE_VERSION_REVISION 0 +#define ZEROTIER_ONE_VERSION_REVISION 1 #endif