mirror of
https://github.com/ZeroTier/ZeroTierOne
synced 2025-08-14 02:27:38 -07:00
Add code to check external surface against reported surface from other trusted peers, and also rename ExternalSurface to SelfAwareness because lulz.
This commit is contained in:
parent
76ad19f411
commit
a2821e9000
6 changed files with 83 additions and 40 deletions
|
@ -45,7 +45,6 @@
|
|||
#include "InetAddress.hpp"
|
||||
#include "Utils.hpp"
|
||||
#include "Dictionary.hpp"
|
||||
#include "ExternalSurface.hpp"
|
||||
|
||||
namespace ZeroTier {
|
||||
|
||||
|
@ -321,20 +320,6 @@ public:
|
|||
};
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Update our knowledge of exterior network addresses
|
||||
*
|
||||
* If the remote peer in question is trusted, this will update our internal
|
||||
* instance of ExternalSurface. If our surface has changed, this triggers a
|
||||
* partial or total reset of ephemeral peer addresses and a renegotiation of
|
||||
* new ones using supernodes / relays.
|
||||
*
|
||||
* @param remotePeer Remote peer address
|
||||
* @param mirroredAddress Real-world network address the remote peer told us we have
|
||||
* @param now Current time
|
||||
*/
|
||||
bool updateSurface(const SharedPtr<Peer> &remotePeer,const InetAddress &mirroredAddress,uint64_t now);
|
||||
|
||||
/**
|
||||
* Validate a root topology dictionary against the identities specified in Defaults
|
||||
*
|
||||
|
@ -356,8 +341,6 @@ private:
|
|||
std::vector< Address > _supernodeAddresses;
|
||||
std::vector< SharedPtr<Peer> > _supernodePeers;
|
||||
|
||||
ExternalSurface _surface;
|
||||
|
||||
Mutex _lock;
|
||||
|
||||
// Set to true if my identity is in _supernodes
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue