mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-02-20 17:52:46 +00:00
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.
This commit is contained in:
parent
5e71e07f59
commit
2f00ae4fd7
@ -305,12 +305,12 @@ bool PacketDecoder::_doOK(const RuntimeEnvironment *_r,const SharedPtr<Peer> &pe
|
||||
bool PacketDecoder::_doWHOIS(const RuntimeEnvironment *_r,const SharedPtr<Peer> &peer)
|
||||
{
|
||||
if (payloadLength() == ZT_ADDRESS_LENGTH) {
|
||||
SharedPtr<Peer> 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());
|
||||
|
Loading…
x
Reference in New Issue
Block a user