mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-06-05 03:53:44 +02:00
Bump protocol version to 10
This commit is contained in:
parent
4743ad0b16
commit
cacdb445c7
4 changed files with 33 additions and 28 deletions
|
@ -1620,7 +1620,7 @@ void EmbeddedNetworkController::_request(
|
||||||
if ( (ipRangeStartIA.ss_family == AF_INET) && (ipRangeEndIA.ss_family == AF_INET) ) {
|
if ( (ipRangeStartIA.ss_family == AF_INET) && (ipRangeEndIA.ss_family == AF_INET) ) {
|
||||||
uint32_t ipRangeStart = Utils::ntoh((uint32_t)(reinterpret_cast<struct sockaddr_in *>(&ipRangeStartIA)->sin_addr.s_addr));
|
uint32_t ipRangeStart = Utils::ntoh((uint32_t)(reinterpret_cast<struct sockaddr_in *>(&ipRangeStartIA)->sin_addr.s_addr));
|
||||||
uint32_t ipRangeEnd = Utils::ntoh((uint32_t)(reinterpret_cast<struct sockaddr_in *>(&ipRangeEndIA)->sin_addr.s_addr));
|
uint32_t ipRangeEnd = Utils::ntoh((uint32_t)(reinterpret_cast<struct sockaddr_in *>(&ipRangeEndIA)->sin_addr.s_addr));
|
||||||
|
|
||||||
if ((ipRangeEnd < ipRangeStart)||(ipRangeStart == 0))
|
if ((ipRangeEnd < ipRangeStart)||(ipRangeStart == 0))
|
||||||
continue;
|
continue;
|
||||||
uint32_t ipRangeLen = ipRangeEnd - ipRangeStart;
|
uint32_t ipRangeLen = ipRangeEnd - ipRangeStart;
|
||||||
|
@ -1671,7 +1671,7 @@ void EmbeddedNetworkController::_request(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Issue a certificate of ownership for all static IPs
|
// Issue a certificate of ownership for all static IPs
|
||||||
if (nc->staticIpCount) {
|
if (nc->staticIpCount) {
|
||||||
nc->certificatesOfOwnership[0] = CertificateOfOwnership(nwid,now,identity.address(),1);
|
nc->certificatesOfOwnership[0] = CertificateOfOwnership(nwid,now,identity.address(),1);
|
||||||
|
|
|
@ -45,31 +45,34 @@
|
||||||
/**
|
/**
|
||||||
* Protocol version -- incremented only for major changes
|
* Protocol version -- incremented only for major changes
|
||||||
*
|
*
|
||||||
* 1 - 0.2.0 ... 0.2.5
|
* 1 - 0.2.0 ... 0.2.5
|
||||||
* 2 - 0.3.0 ... 0.4.5
|
* 2 - 0.3.0 ... 0.4.5
|
||||||
* + Added signature and originating peer to multicast frame
|
* + Added signature and originating peer to multicast frame
|
||||||
* + Double size of multicast frame bloom filter
|
* + Double size of multicast frame bloom filter
|
||||||
* 3 - 0.5.0 ... 0.6.0
|
* 3 - 0.5.0 ... 0.6.0
|
||||||
* + Yet another multicast redesign
|
* + Yet another multicast redesign
|
||||||
* + New crypto completely changes key agreement cipher
|
* + New crypto completely changes key agreement cipher
|
||||||
* 4 - 0.6.0 ... 1.0.6
|
* 4 - 0.6.0 ... 1.0.6
|
||||||
* + BREAKING CHANGE: New identity format based on hashcash design
|
* + BREAKING CHANGE: New identity format based on hashcash design
|
||||||
* 5 - 1.1.0 ... 1.1.5
|
* 5 - 1.1.0 ... 1.1.5
|
||||||
* + Supports echo
|
* + Supports echo
|
||||||
* + Supports in-band world (root server definition) updates
|
* + Supports in-band world (root server definition) updates
|
||||||
* + Clustering! (Though this will work with protocol v4 clients.)
|
* + Clustering! (Though this will work with protocol v4 clients.)
|
||||||
* + Otherwise backward compatible with protocol v4
|
* + Otherwise backward compatible with protocol v4
|
||||||
* 6 - 1.1.5 ... 1.1.10
|
* 6 - 1.1.5 ... 1.1.10
|
||||||
* + Network configuration format revisions including binary values
|
* + Network configuration format revisions including binary values
|
||||||
* 7 - 1.1.10 ... 1.1.17
|
* 7 - 1.1.10 ... 1.1.17
|
||||||
* + Introduce trusted paths for local SDN use
|
* + Introduce trusted paths for local SDN use
|
||||||
* 8 - 1.1.17 ... 1.2.0
|
* 8 - 1.1.17 ... 1.2.0
|
||||||
* + Multipart network configurations for large network configs
|
* + Multipart network configurations for large network configs
|
||||||
* + Tags and Capabilities
|
* + Tags and Capabilities
|
||||||
* + Inline push of CertificateOfMembership deprecated
|
* + Inline push of CertificateOfMembership deprecated
|
||||||
* 9 - 1.2.0 ... CURRENT
|
* 9 - 1.2.0 ... 1.2.14
|
||||||
|
* 10 - 1.4.0 ... CURRENT
|
||||||
|
* + Multipath capability and load balancing
|
||||||
|
* + Certificates of Delegation (CoDs) for full root decentralization
|
||||||
*/
|
*/
|
||||||
#define ZT_PROTO_VERSION 9
|
#define ZT_PROTO_VERSION 10
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Minimum supported protocol version
|
* Minimum supported protocol version
|
||||||
|
|
|
@ -650,10 +650,11 @@ void Peer::introduce(void *const tPtr,const int64_t now,const SharedPtr<Peer> &o
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
inline void Peer::processBackgroundPeerTasks(int64_t now)
|
inline void Peer::processBackgroundPeerTasks(const int64_t now)
|
||||||
{
|
{
|
||||||
// Determine current multipath compatibility with other peer
|
// Determine current multipath compatibility with other peer
|
||||||
if ((now - _lastMultipathCompatibilityCheck) >= ZT_PATH_QUALITY_COMPUTE_INTERVAL) {
|
if ((now - _lastMultipathCompatibilityCheck) >= ZT_PATH_QUALITY_COMPUTE_INTERVAL) {
|
||||||
|
//
|
||||||
// Cache number of available paths so that we can short-circuit multipath logic elsewhere
|
// Cache number of available paths so that we can short-circuit multipath logic elsewhere
|
||||||
//
|
//
|
||||||
// We also take notice of duplicate paths (same IP only) because we may have
|
// We also take notice of duplicate paths (same IP only) because we may have
|
||||||
|
@ -663,6 +664,7 @@ inline void Peer::processBackgroundPeerTasks(int64_t now)
|
||||||
//
|
//
|
||||||
// This is done to support the behavior of auto multipath enable/disable
|
// This is done to support the behavior of auto multipath enable/disable
|
||||||
// without user intervention.
|
// without user intervention.
|
||||||
|
//
|
||||||
int currAlivePathCount = 0;
|
int currAlivePathCount = 0;
|
||||||
int duplicatePathsFound = 0;
|
int duplicatePathsFound = 0;
|
||||||
for (unsigned int i=0;i<ZT_MAX_PEER_NETWORK_PATHS;++i) {
|
for (unsigned int i=0;i<ZT_MAX_PEER_NETWORK_PATHS;++i) {
|
||||||
|
|
|
@ -419,7 +419,7 @@ public:
|
||||||
*
|
*
|
||||||
* @param now Current time
|
* @param now Current time
|
||||||
*/
|
*/
|
||||||
inline void processBackgroundPeerTasks(int64_t now);
|
inline void processBackgroundPeerTasks(const int64_t now);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Record that the remote peer does have multipath enabled. As is evident by the receipt of a VERB_ACK
|
* Record that the remote peer does have multipath enabled. As is evident by the receipt of a VERB_ACK
|
||||||
|
|
Loading…
Add table
Reference in a new issue