mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2024-12-22 06:17:48 +00:00
Update bloom filter for MULTICAST_FRAME retransmit, and temporarily add abort() to catch gremlin
This commit is contained in:
parent
086050686f
commit
a004878546
@ -287,12 +287,11 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Add a supernode if there's nowhere else to go. Supernodes know of all multicast
|
// Add a supernode if there's nowhere else to go. Supernodes know of all multicast
|
||||||
// LIKEs and so can act to bridge sparse multicast groups. We do not remember them
|
// LIKEs and so can act to bridge sparse multicast groups.
|
||||||
// in the bloom filter.
|
|
||||||
if (!picked) {
|
if (!picked) {
|
||||||
Address avoid[2];
|
Address avoid[2];
|
||||||
avoid[0] = upstream;
|
avoid[0] = upstream;
|
||||||
avoid[1] = originalSubmitter;
|
avoid[1] = originalSubmitter; // otherwise supernodes will play ping pong
|
||||||
P peer = topology.getBestSupernode(avoid,2,true);
|
P peer = topology.getBestSupernode(avoid,2,true);
|
||||||
if (peer)
|
if (peer)
|
||||||
peers[picked++] = peer;
|
peers[picked++] = peer;
|
||||||
|
@ -477,6 +477,7 @@ bool PacketDecoder::_doMULTICAST_FRAME(const RuntimeEnvironment *_r,const Shared
|
|||||||
|
|
||||||
setSource(_r->identity.address());
|
setSource(_r->identity.address());
|
||||||
(*this)[ZT_PROTO_VERB_MULTICAST_FRAME_IDX_HOP_COUNT] = hops;
|
(*this)[ZT_PROTO_VERB_MULTICAST_FRAME_IDX_HOP_COUNT] = hops;
|
||||||
|
memcpy(field(ZT_PROTO_VERB_MULTICAST_FRAME_IDX_BLOOM_FILTER,ZT_PROTO_VERB_MULTICAST_FRAME_BLOOM_FILTER_SIZE_BYTES),bloom.data(),ZT_PROTO_VERB_MULTICAST_FRAME_BLOOM_FILTER_SIZE_BYTES);
|
||||||
compress();
|
compress();
|
||||||
|
|
||||||
for(unsigned int i=0;i<np;++i) {
|
for(unsigned int i=0;i<np;++i) {
|
||||||
|
@ -115,6 +115,7 @@ void Topology::addPeer(const SharedPtr<Peer> &candidate,void (*callback)(void *,
|
|||||||
SharedPtr<Peer> Topology::getPeer(const Address &zta)
|
SharedPtr<Peer> Topology::getPeer(const Address &zta)
|
||||||
{
|
{
|
||||||
if (zta == _r->identity.address()) {
|
if (zta == _r->identity.address()) {
|
||||||
|
abort();
|
||||||
TRACE("BUG: ignored attempt to getPeer() for self, returned NULL");
|
TRACE("BUG: ignored attempt to getPeer() for self, returned NULL");
|
||||||
return SharedPtr<Peer>();
|
return SharedPtr<Peer>();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user