summaryrefslogtreecommitdiff
path: root/node/Peer.cpp
diff options
context:
space:
mode:
authorAdam Ierymenko <adam.ierymenko@gmail.com>2017-10-25 16:01:36 -0700
committerAdam Ierymenko <adam.ierymenko@gmail.com>2017-10-25 16:01:36 -0700
commitfac7dc9c913a94550692c31ca6c24fa4db5b5b52 (patch)
tree0538fb414506b57caec90230c47e434bec5d172b /node/Peer.cpp
parent508fa6a7fed894fd616239c04aeb0c2e8f6b9022 (diff)
downloadinfinitytier-fac7dc9c913a94550692c31ca6c24fa4db5b5b52.tar.gz
infinitytier-fac7dc9c913a94550692c31ca6c24fa4db5b5b52.zip
Stop duplciate IPv6 addresses due to privacy mode IPs.
Diffstat (limited to 'node/Peer.cpp')
-rw-r--r--node/Peer.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/node/Peer.cpp b/node/Peer.cpp
index d68e0df3..a3682a97 100644
--- a/node/Peer.cpp
+++ b/node/Peer.cpp
@@ -171,7 +171,7 @@ void Peer::received(
bool redundant = false;
for(unsigned int i=0;i<ZT_MAX_PEER_NETWORK_PATHS;++i) {
if (_paths[i].p) {
- if ( (_paths[i].p->alive(now)) && ( ((_paths[i].p->localSocket() == path->localSocket())&&(_paths[i].p->address().ss_family == path->address().ss_family)) || (_paths[i].p->address().ipsEqual(path->address())) ) ) {
+ if ( (_paths[i].p->alive(now)) && ( ((_paths[i].p->localSocket() == path->localSocket())&&(_paths[i].p->address().ss_family == path->address().ss_family)) || (_paths[i].p->address().ipsEqual2(path->address())) ) ) {
redundant = true;
break;
}
@@ -560,7 +560,7 @@ void Peer::clusterRedirect(void *tPtr,const SharedPtr<Path> &originatingPath,con
unsigned int j = 0;
for(unsigned int i=0;i<ZT_MAX_PEER_NETWORK_PATHS;++i) {
if (_paths[i].p) {
- if ((_paths[i].priority >= newPriority)&&(!_paths[i].p->address().ipsEqual(remoteAddress))) {
+ if ((_paths[i].priority >= newPriority)&&(!_paths[i].p->address().ipsEqual2(remoteAddress))) {
if (i != j)
_paths[j] = _paths[i];
++j;