mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-06-06 12:33:44 +02:00
Nuke some abandoned code.
This commit is contained in:
parent
40d5c79b62
commit
dda376c9eb
2 changed files with 0 additions and 31 deletions
|
@ -231,22 +231,6 @@ void Peer::pushDirectPaths(const RuntimeEnvironment *RR,RemotePath *path,uint64_
|
||||||
|
|
||||||
std::vector<Path> dps(RR->node->directPaths());
|
std::vector<Path> dps(RR->node->directPaths());
|
||||||
|
|
||||||
// Push peer-reported surface -- tried this and it didn't help much with difficult NATs so commenting out.
|
|
||||||
/*
|
|
||||||
std::vector< std::pair<Address,InetAddress> > surface(RR->sa->getReportedSurface());
|
|
||||||
for(std::vector< std::pair<Address,InetAddress> >::const_iterator s(surface.begin());s!=surface.end();++s) {
|
|
||||||
bool alreadyHave = false;
|
|
||||||
for(std::vector<Path>::const_iterator p(dps.begin());p!=dps.end();++p) {
|
|
||||||
if (p->address() == s->second) {
|
|
||||||
alreadyHave = true;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (!alreadyHave)
|
|
||||||
dps.push_back(Path(s->second,0,Path::TRUST_NORMAL));
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifdef ZT_TRACE
|
#ifdef ZT_TRACE
|
||||||
{
|
{
|
||||||
std::string ps;
|
std::string ps;
|
||||||
|
|
|
@ -66,21 +66,6 @@ public:
|
||||||
*/
|
*/
|
||||||
void clean(uint64_t now);
|
void clean(uint64_t now);
|
||||||
|
|
||||||
/**
|
|
||||||
* @return List of external surface addresses as reported by peers
|
|
||||||
*/
|
|
||||||
inline std::vector< std::pair<Address,InetAddress> > getReportedSurface() const
|
|
||||||
{
|
|
||||||
std::vector< std::pair<Address,InetAddress> > r;
|
|
||||||
{
|
|
||||||
Mutex::Lock _l(_phy_m);
|
|
||||||
r.reserve(_phy.size());
|
|
||||||
for(std::map< PhySurfaceKey,PhySurfaceEntry >::const_iterator p(_phy.begin());p!=_phy.end();++p)
|
|
||||||
r.push_back(std::pair<Address,InetAddress>(p->first.reporter,p->second.mySurface));
|
|
||||||
}
|
|
||||||
return r;
|
|
||||||
}
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
struct PhySurfaceKey
|
struct PhySurfaceKey
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue