Fix nonsensical equality comparison which may prevent certain links from being regarded as preferred in multipath scenarios

This commit is contained in:
Joseph Henry 2022-08-29 16:03:48 -07:00
parent 7e92d478a1
commit b6074da498
No known key found for this signature in database
GPG Key ID: C45B33FF5EBC9344

View File

@ -267,7 +267,7 @@ void Bond::nominatePathToBond(const SharedPtr<Path>& path, int64_t now)
if (commonLink) { if (commonLink) {
for (unsigned int j = 0; j < ZT_MAX_PEER_NETWORK_PATHS; ++j) { for (unsigned int j = 0; j < ZT_MAX_PEER_NETWORK_PATHS; ++j) {
if (_paths[j].p && _paths[j].p.ptr() != _paths[i].p.ptr()) { if (_paths[j].p && _paths[j].p.ptr() != _paths[i].p.ptr()) {
if (RR->bc->getLinkBySocket(_policyAlias, _paths[j].p->localSocket()) == commonLink, true) { if (RR->bc->getLinkBySocket(_policyAlias, _paths[j].p->localSocket(), true) == commonLink) {
bFoundCommonLink = true; bFoundCommonLink = true;
_paths[j].onlyPathOnLink = false; _paths[j].onlyPathOnLink = false;
} }