diff options
author | Adam Ierymenko <adam.ierymenko@gmail.com> | 2015-04-15 18:32:25 -0700 |
---|---|---|
committer | Adam Ierymenko <adam.ierymenko@gmail.com> | 2015-04-15 18:32:25 -0700 |
commit | ea1859541c29bc3cafcde5ad9be131c942522c5f (patch) | |
tree | cc6aaa37552466d78a957f63bb22f71e07dbc3dd /node | |
parent | f7b1437154576ec42734de6c2b2ee4adfb1f4f6d (diff) | |
download | infinitytier-ea1859541c29bc3cafcde5ad9be131c942522c5f.tar.gz infinitytier-ea1859541c29bc3cafcde5ad9be131c942522c5f.zip |
More cleanup, and fix for the extremely unlikely case of identity collision.
Diffstat (limited to 'node')
-rw-r--r-- | node/IncomingPacket.cpp | 2 | ||||
-rw-r--r-- | node/Network.cpp | 2 | ||||
-rw-r--r-- | node/NetworkController.hpp | 2 |
3 files changed, 4 insertions, 2 deletions
diff --git a/node/IncomingPacket.cpp b/node/IncomingPacket.cpp index 967f50f2..efb506fe 100644 --- a/node/IncomingPacket.cpp +++ b/node/IncomingPacket.cpp @@ -674,7 +674,7 @@ bool IncomingPacket::_doNETWORK_CONFIG_REQUEST(const RuntimeEnvironment *RR,cons if (RR->localNetworkController) { Dictionary netconf; - switch(RR->localNetworkController->doNetworkConfigRequest((h > 0) ? InetAddress() : _remoteAddress,peer->identity(),nwid,metaData,haveRevision,netconf)) { + switch(RR->localNetworkController->doNetworkConfigRequest((h > 0) ? InetAddress() : _remoteAddress,RR->identity,peer->identity(),nwid,metaData,haveRevision,netconf)) { case NetworkController::NETCONF_QUERY_OK: { const std::string netconfStr(netconf.toString()); if (netconfStr.length() > 0xffff) { // sanity check since field ix 16-bit diff --git a/node/Network.cpp b/node/Network.cpp index 1c786d24..08856f02 100644 --- a/node/Network.cpp +++ b/node/Network.cpp @@ -250,7 +250,7 @@ void Network::requestConfiguration() if (RR->localNetworkController) { SharedPtr<NetworkConfig> nconf(config2()); Dictionary newconf; - switch(RR->localNetworkController->doNetworkConfigRequest(InetAddress(),RR->identity,_id,Dictionary(),(nconf) ? nconf->revision() : (uint64_t)0,newconf)) { + switch(RR->localNetworkController->doNetworkConfigRequest(InetAddress(),RR->identity,RR->identity,_id,Dictionary(),(nconf) ? nconf->revision() : (uint64_t)0,newconf)) { case NetworkController::NETCONF_QUERY_OK: this->setConfiguration(newconf,true); return; diff --git a/node/NetworkController.hpp b/node/NetworkController.hpp index 353c091a..265ee3d4 100644 --- a/node/NetworkController.hpp +++ b/node/NetworkController.hpp @@ -71,6 +71,7 @@ public: * to indicate the error. * * @param fromAddr Originating wire address or null address if packet is not direct (or from self) + * @param signingId Identity that should be used to sign results -- must include private key * @param identity Originating peer ZeroTier identity * @param nwid 64-bit network ID * @param metaData Meta-data bundled with request (empty if none) @@ -80,6 +81,7 @@ public: */ virtual NetworkController::ResultCode doNetworkConfigRequest( const InetAddress &fromAddr, + const Identity &signingId, const Identity &identity, uint64_t nwid, const Dictionary &metaData, |