(1) fix crazy bug introduced in doRENDEZVOUS(), (2) reclaim Paths after paths[] condense, (3) fix an edge case around symmetric NAT and external IP change detection.
This commit is contained in:
parent
deee39343e
commit
48a374c82c
3 changed files with 13 additions and 8 deletions
|
@ -339,7 +339,9 @@ bool Peer::resetWithinScope(InetAddress::IpScope scope,uint64_t now)
|
|||
++x;
|
||||
}
|
||||
_numPaths = y;
|
||||
return (y < np);
|
||||
while (y < ZT_MAX_PEER_NETWORK_PATHS)
|
||||
_paths[y++].path.zero(); // let go of unused SmartPtr<>'s
|
||||
return (_numPaths < np);
|
||||
}
|
||||
|
||||
void Peer::getBestActiveAddresses(uint64_t now,InetAddress &v4,InetAddress &v6) const
|
||||
|
@ -390,6 +392,8 @@ void Peer::clean(uint64_t now)
|
|||
++x;
|
||||
}
|
||||
_numPaths = y;
|
||||
while (y < ZT_MAX_PEER_NETWORK_PATHS)
|
||||
_paths[y++].path.zero(); // let go of unused SmartPtr<>'s
|
||||
}
|
||||
|
||||
bool Peer::_pushDirectPaths(const SharedPtr<Path> &path,uint64_t now)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue