From b7148c107d04ba7b71577c764e88a02098d23480 Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Mon, 2 Feb 2015 16:40:57 -0800 Subject: Rip out network environment fingerprint. This will be replaced by constant monitoring of actual external address surface. --- node/RoutingTable.cpp | 35 ----------------------------------- 1 file changed, 35 deletions(-) (limited to 'node/RoutingTable.cpp') 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 &ignoreInterfaces) const -{ - uint64_t fp = 0; - std::vector rtab(get()); - for(std::vector::const_iterator re(rtab.begin());re!=rtab.end();++re) { - bool skip = false; - for(std::vector::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 -- cgit v1.2.3