mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-06-05 03:53:44 +02:00
Fix getPeer(self) bug if I am the controller.
This commit is contained in:
parent
0410fd4824
commit
7b7ab823b0
1 changed files with 3 additions and 1 deletions
|
@ -228,7 +228,9 @@ void Multicaster::send(
|
||||||
gs.lastExplicitGather = now;
|
gs.lastExplicitGather = now;
|
||||||
SharedPtr<Peer> explicitGatherPeers[2];
|
SharedPtr<Peer> explicitGatherPeers[2];
|
||||||
explicitGatherPeers[0] = RR->topology->getBestRoot();
|
explicitGatherPeers[0] = RR->topology->getBestRoot();
|
||||||
explicitGatherPeers[1] = RR->topology->getPeer(Network::controllerFor(nwid));
|
const Address nwidc(Network::controllerFor(nwid));
|
||||||
|
if (nwidc != RR->identity.address())
|
||||||
|
explicitGatherPeers[1] = RR->topology->getPeer(nwidc);
|
||||||
for(unsigned int k=0;k<2;++k) {
|
for(unsigned int k=0;k<2;++k) {
|
||||||
const SharedPtr<Peer> &p = explicitGatherPeers[k];
|
const SharedPtr<Peer> &p = explicitGatherPeers[k];
|
||||||
if (!p)
|
if (!p)
|
||||||
|
|
Loading…
Add table
Reference in a new issue