diff options
author | Adam Ierymenko <adam.ierymenko@gmail.com> | 2015-04-26 16:03:16 -0700 |
---|---|---|
committer | Adam Ierymenko <adam.ierymenko@gmail.com> | 2015-04-26 16:03:16 -0700 |
commit | a1005ca85826bfde59b34f205c10adc6ff1a3a1b (patch) | |
tree | f8b5f66f6aaeee5d458418ba1b2eca40bffa2669 /node | |
parent | 8c5ec54711ed4fccbb3f85c7e8089600c4edea51 (diff) | |
download | infinitytier-a1005ca85826bfde59b34f205c10adc6ff1a3a1b.tar.gz infinitytier-a1005ca85826bfde59b34f205c10adc6ff1a3a1b.zip |
Do not unite() peers across different IP scopes as this would pretty much never work.
Diffstat (limited to 'node')
-rw-r--r-- | node/Switch.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/node/Switch.cpp b/node/Switch.cpp index 8c27fdfa..e2bc74c5 100644 --- a/node/Switch.cpp +++ b/node/Switch.cpp @@ -296,6 +296,9 @@ bool Switch::unite(const Address &p1,const Address &p2,bool force) if (!(cg.first)) return false; + if (cg.first.ipScope() != cg.second.ipScope()) + return false; + // Addresses are sorted in key for last unite attempt map for order // invariant lookup: (p1,p2) == (p2,p1) Array<Address,2> uniteKey; |