summaryrefslogtreecommitdiff
path: root/node/Peer.cpp
diff options
context:
space:
mode:
authorAdam Ierymenko <adam.ierymenko@gmail.com>2015-10-27 16:47:13 -0700
committerAdam Ierymenko <adam.ierymenko@gmail.com>2015-10-27 16:47:13 -0700
commitcc1b275ad97bf186f21b487aa57d7893bee3c956 (patch)
treea157a5a0fcc7c512e96dcb9d4383002e82048baf /node/Peer.cpp
parentcc6080fe3898ddd1419050ee3a2c45cc87dd140b (diff)
downloadinfinitytier-cc1b275ad97bf186f21b487aa57d7893bee3c956.tar.gz
infinitytier-cc1b275ad97bf186f21b487aa57d7893bee3c956.zip
Replicate peer endpoints and forget paths if we have them -- this allows two clusters to talk to each other, whereas forgetting all paths does not.
Diffstat (limited to 'node/Peer.cpp')
-rw-r--r--node/Peer.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/node/Peer.cpp b/node/Peer.cpp
index 99e2156e..99eb32c7 100644
--- a/node/Peer.cpp
+++ b/node/Peer.cpp
@@ -140,13 +140,10 @@ void Peer::received(
_lastMulticastFrame = now;
#ifdef ZT_ENABLE_CLUSTER
- // If we're in cluster mode and there's a better endpoint, stop here and don't
- // learn or confirm paths. Also reset any existing paths, since they should
- // go there and no longer talk to us here.
- if (redirectTo) {
- _numPaths = 0;
+ // If we think this peer belongs elsewhere, don't learn this path or
+ // do other connection init stuff.
+ if (redirectTo)
return;
- }
#endif
if ((now - _lastAnnouncedTo) >= ((ZT_MULTICAST_LIKE_EXPIRE / 2) - 1000)) {
@@ -206,7 +203,7 @@ void Peer::received(
#ifdef ZT_ENABLE_CLUSTER
if ((RR->cluster)&&(pathIsConfirmed))
- RR->cluster->replicateHavePeer(_id);
+ RR->cluster->replicateHavePeer(_id,remoteAddr);
#endif
if (needMulticastGroupAnnounce) {