diff options
| author | Adam Ierymenko <adam.ierymenko@gmail.com> | 2015-02-02 16:40:57 -0800 |
|---|---|---|
| committer | Adam Ierymenko <adam.ierymenko@gmail.com> | 2015-02-02 16:40:57 -0800 |
| commit | b7148c107d04ba7b71577c764e88a02098d23480 (patch) | |
| tree | c5f7026b81ba58cb802fd52f053b010f39925acd /node/RoutingTable.cpp | |
| parent | b1bf3f68c327588132c55fe2fe913d3ec98c0b25 (diff) | |
| download | infinitytier-b7148c107d04ba7b71577c764e88a02098d23480.tar.gz infinitytier-b7148c107d04ba7b71577c764e88a02098d23480.zip | |
Rip out network environment fingerprint. This will be replaced by constant monitoring of actual external address surface.
Diffstat (limited to 'node/RoutingTable.cpp')
| -rw-r--r-- | node/RoutingTable.cpp | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/node/RoutingTable.cpp b/node/RoutingTable.cpp index 2caafebe..6a5448a8 100644 --- a/node/RoutingTable.cpp +++ b/node/RoutingTable.cpp @@ -74,39 +74,4 @@ RoutingTable::~RoutingTable() { } -uint64_t RoutingTable::networkEnvironmentFingerprint(const std::vector<std::string> &ignoreInterfaces) const -{ - uint64_t fp = 0; - std::vector<Entry> rtab(get()); - for(std::vector<Entry>::const_iterator re(rtab.begin());re!=rtab.end();++re) { - bool skip = false; - for(std::vector<std::string>::const_iterator ii(ignoreInterfaces.begin());ii!=ignoreInterfaces.end();++ii) { - if (*ii == re->device) { - skip = true; - break; - } - } - if (skip) - continue; - ++fp; - if (re->destination.isV4()) { - fp = Utils::sdbmHash(re->destination.rawIpData(),4,fp); - fp = Utils::sdbmHash((uint16_t)re->destination.netmaskBits(),fp); - } else if (re->destination.isV6()) { - fp = Utils::sdbmHash(re->destination.rawIpData(),16,fp); - fp = Utils::sdbmHash((uint16_t)re->destination.netmaskBits(),fp); - } - if (re->gateway.isV4()) { - fp = Utils::sdbmHash(re->gateway.rawIpData(),4,fp); - fp = Utils::sdbmHash((uint16_t)re->gateway.netmaskBits(),fp); - } else if (re->gateway.isV6()) { - fp = Utils::sdbmHash(re->gateway.rawIpData(),16,fp); - fp = Utils::sdbmHash((uint16_t)re->gateway.netmaskBits(),fp); - } - fp = Utils::sdbmHash(re->device,fp); - fp = Utils::sdbmHash((uint32_t)re->metric,fp); - } - return fp; -} - } // namespace ZeroTier |
