Rip out dead "firewall opener" code, replace in pipeline with anti-symmetric-NAT tactics.
This commit is contained in:
parent
d02ecfb288
commit
4e9280fc7a
9 changed files with 27 additions and 134 deletions
|
@ -50,7 +50,7 @@
|
|||
#include "NonCopyable.hpp"
|
||||
#include "Mutex.hpp"
|
||||
|
||||
#define ZT_PEER_SERIALIZATION_VERSION 10
|
||||
#define ZT_PEER_SERIALIZATION_VERSION 11
|
||||
|
||||
namespace ZeroTier {
|
||||
|
||||
|
@ -142,17 +142,6 @@ public:
|
|||
*/
|
||||
Path::Type send(const RuntimeEnvironment *_r,const void *data,unsigned int len,uint64_t now);
|
||||
|
||||
#ifdef ZT_FIREWALL_OPENER_DELAY
|
||||
/**
|
||||
* Send firewall opener to all UDP paths
|
||||
*
|
||||
* @param _r Runtime environment
|
||||
* @param now Current time
|
||||
* @return True if send appears successful for at least one address type
|
||||
*/
|
||||
bool sendFirewallOpener(const RuntimeEnvironment *_r,uint64_t now);
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Send HELLO to a peer via all direct paths available
|
||||
*
|
||||
|
@ -193,19 +182,6 @@ public:
|
|||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Last successfully sent firewall opener for any path
|
||||
*/
|
||||
inline uint64_t lastFirewallOpener() const
|
||||
throw()
|
||||
{
|
||||
uint64_t x = 0;
|
||||
Mutex::Lock _l(_lock);
|
||||
for(std::vector<Path>::const_iterator p(_paths.begin());p!=_paths.end();++p)
|
||||
x = std::max(x,p->lastFirewallOpener());
|
||||
return x;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Time of last direct packet receive for any path
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue