diff options
| author | Adam Ierymenko <adam.ierymenko@gmail.com> | 2014-04-10 14:22:25 -0700 |
|---|---|---|
| committer | Adam Ierymenko <adam.ierymenko@gmail.com> | 2014-04-10 14:22:25 -0700 |
| commit | c9294c1a78fa86fbba38b1a81988ea7527b0872c (patch) | |
| tree | 0a2b3b88014b244020864839d4517a92ef1b5948 /node/Peer.cpp | |
| parent | b117ff54358d4e2b6b8eae4bd5300464f377d948 (diff) | |
| download | infinitytier-c9294c1a78fa86fbba38b1a81988ea7527b0872c.tar.gz infinitytier-c9294c1a78fa86fbba38b1a81988ea7527b0872c.zip | |
Prevent recursive transit of ZeroTier packets, toward GitHub issue #56
Diffstat (limited to 'node/Peer.cpp')
| -rw-r--r-- | node/Peer.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/node/Peer.cpp b/node/Peer.cpp index 5c87275f..3aeb821e 100644 --- a/node/Peer.cpp +++ b/node/Peer.cpp @@ -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; |
