mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-06-02 07:20:51 +00:00
Untested cluster code, not enabled.
This commit is contained in:
parent
619e113748
commit
59389b3dce
@ -6,7 +6,7 @@ ifeq ($(origin CXX),default)
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
INCLUDES=
|
INCLUDES=
|
||||||
DEFS=-DZT_ENABLE_CLUSTER
|
DEFS=
|
||||||
LIBS=
|
LIBS=
|
||||||
ARCH_FLAGS=-arch x86_64
|
ARCH_FLAGS=-arch x86_64
|
||||||
|
|
||||||
|
@ -195,8 +195,12 @@ void Cluster::handleIncomingStateMessage(const void *msg,unsigned int len)
|
|||||||
const Address destinationAddress(reinterpret_cast<const char *>(packet) + 8,ZT_ADDRESS_LENGTH);
|
const Address destinationAddress(reinterpret_cast<const char *>(packet) + 8,ZT_ADDRESS_LENGTH);
|
||||||
SharedPtr<Peer> destinationPeer(RR->topology->getPeer(destinationAddress));
|
SharedPtr<Peer> destinationPeer(RR->topology->getPeer(destinationAddress));
|
||||||
if (destinationPeer) {
|
if (destinationPeer) {
|
||||||
RemotePath *destinationPath = destinationPeer->send(RR,packet,packetLen,RR->node->now());
|
if (
|
||||||
if ((destinationPath)&&(numRemotePeerPaths > 0)&&(packetLen >= 18)&&(reinterpret_cast<const unsigned char *>(packet)[ZT_PACKET_FRAGMENT_IDX_FRAGMENT_INDICATOR] == ZT_PACKET_FRAGMENT_INDICATOR)) {
|
(destinationPeer->send(RR,packet,packetLen,RR->node->now()))&&
|
||||||
|
(numRemotePeerPaths > 0)&&
|
||||||
|
(packetLen >= 18)&&
|
||||||
|
(reinterpret_cast<const unsigned char *>(packet)[ZT_PACKET_FRAGMENT_IDX_FRAGMENT_INDICATOR] == ZT_PACKET_FRAGMENT_INDICATOR)
|
||||||
|
) {
|
||||||
// If remote peer paths were sent with this relayed packet, we do
|
// If remote peer paths were sent with this relayed packet, we do
|
||||||
// RENDEZVOUS. It's handled here for cluster-relayed packets since
|
// RENDEZVOUS. It's handled here for cluster-relayed packets since
|
||||||
// we don't have both Peer records so this is a different path.
|
// we don't have both Peer records so this is a different path.
|
||||||
|
@ -183,7 +183,7 @@ Identity Topology::getIdentity(const Address &zta)
|
|||||||
return _getIdentity(zta);
|
return _getIdentity(zta);
|
||||||
}
|
}
|
||||||
|
|
||||||
void saveIdentity(const Identity &id)
|
void Topology::saveIdentity(const Identity &id)
|
||||||
{
|
{
|
||||||
if (id) {
|
if (id) {
|
||||||
char p[128];
|
char p[128];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user