mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-04-16 03:56:54 +02:00
Revert change to path quality to fix IPv6 issue in beta. We will rework this in 2.x.
This commit is contained in:
parent
2c75be0d64
commit
8d83b9b7c5
1 changed files with 5 additions and 10 deletions
|
@ -184,7 +184,8 @@ public:
|
|||
*
|
||||
* @param t Time of receive
|
||||
*/
|
||||
inline void received(const uint64_t t) {
|
||||
inline void received(const uint64_t t)
|
||||
{
|
||||
if (!alive(t,_bonded)) {
|
||||
_lastAliveToggle = _lastIn;
|
||||
}
|
||||
|
@ -311,15 +312,9 @@ public:
|
|||
*/
|
||||
inline long quality(const int64_t now) const
|
||||
{
|
||||
const long l = (long)_latency;
|
||||
const long age = (long)std::min((now - _lastIn),(int64_t)(ZT_PATH_HEARTBEAT_PERIOD * 10)); // set an upper sanity limit to avoid overflow
|
||||
return (
|
||||
(
|
||||
(age < (long)(ZT_PATH_HEARTBEAT_PERIOD + 5000)) ? l : (l + 0xffff + age)
|
||||
) * (
|
||||
((long)ZT_INETADDRESS_MAX_SCOPE - (long)_ipScope) + (_addr.isV6() ? (long)1 : (long)3)
|
||||
)
|
||||
);
|
||||
const int l = (long)_latency;
|
||||
const int age = (long)std::min((now - _lastIn),(int64_t)(ZT_PATH_HEARTBEAT_PERIOD * 10)); // set an upper sanity limit to avoid overflow
|
||||
return (((age < (ZT_PATH_HEARTBEAT_PERIOD + 5000)) ? l : (l + 0xffff + age)) * (long)((ZT_INETADDRESS_MAX_SCOPE - _ipScope) + 1));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Reference in a new issue