Prevent recursive transit of ZeroTier packets, toward GitHub issue #56

This commit is contained in:
Adam Ierymenko 2014-04-10 14:22:25 -07:00
parent b117ff5435
commit c9294c1a78
6 changed files with 141 additions and 13 deletions

View file

@ -27,6 +27,7 @@
#include "Peer.hpp"
#include "Switch.hpp"
#include "AntiRecursion.hpp"
#include <algorithm>
@ -164,6 +165,7 @@ Path::Type Peer::send(const RuntimeEnvironment *_r,const void *data,unsigned int
if ((bestPath)&&(_r->sm->send(bestPath->address(),bestPath->tcp(),bestPath->type() == Path::PATH_TYPE_TCP_OUT,data,len))) {
bestPath->sent(now);
_r->antiRec->logOutgoingZT(data,len);
return bestPath->type();
}
return Path::PATH_TYPE_NULL;