mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-06-06 20:43:44 +02:00
Fix bad index bug (during switching) in balance-rr
This commit is contained in:
parent
b6ed919fbc
commit
e607348c7e
1 changed files with 2 additions and 2 deletions
|
@ -314,7 +314,7 @@ SharedPtr<Path> Bond::getAppropriatePath(int64_t now, int32_t flowId)
|
||||||
}
|
}
|
||||||
// Reset striping counter
|
// Reset striping counter
|
||||||
_rrPacketsSentOnCurrLink = 0;
|
_rrPacketsSentOnCurrLink = 0;
|
||||||
if (_numBondedPaths == 1) {
|
if (_numBondedPaths == 1 || _rrIdx >= (ZT_MAX_PEER_NETWORK_PATHS-1)) {
|
||||||
_rrIdx = 0;
|
_rrIdx = 0;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -1654,7 +1654,7 @@ void Bond::setBondParameters(int policy, SharedPtr<Bond> templateBond, bool useT
|
||||||
// rr
|
// rr
|
||||||
|
|
||||||
_rrPacketsSentOnCurrLink = 0;
|
_rrPacketsSentOnCurrLink = 0;
|
||||||
_rrIdx = ZT_MAX_PEER_NETWORK_PATHS;
|
_rrIdx = 0;
|
||||||
|
|
||||||
// General parameters
|
// General parameters
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue