mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-01-31 00:23:58 +00:00
Also exclude upstream when picking supernode for multicast propagation, to not bounce back and forth to the same supernode.
This commit is contained in:
parent
1d36ea8ddf
commit
a6f4de8172
@ -263,7 +263,10 @@ public:
|
|||||||
// Add a supernode if there are fewer than the desired
|
// Add a supernode if there are fewer than the desired
|
||||||
// number of recipients.
|
// number of recipients.
|
||||||
if (chosen < max) {
|
if (chosen < max) {
|
||||||
P peer = topology.getBestSupernode(&originalSubmitter,1,true);
|
Address avoid[2];
|
||||||
|
avoid[0] = originalSubmitter;
|
||||||
|
avoid[1] = upstream;
|
||||||
|
P peer = topology.getBestSupernode(avoid,2,true);
|
||||||
if (peer)
|
if (peer)
|
||||||
peers[chosen++] = peer;
|
peers[chosen++] = peer;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user