summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Ierymenko <adam.ierymenko@gmail.com>2013-12-31 01:22:32 -0800
committerAdam Ierymenko <adam.ierymenko@gmail.com>2013-12-31 01:22:32 -0800
commit8055635e85beba3f0cf028cf3efe50dbf99b0cc3 (patch)
tree97bb0ffadf8d7d78441a3d72f9b8318135edb64a
parent83a38b8f4651765d9f30a039f90cf0b3f5d65e0a (diff)
downloadinfinitytier-8055635e85beba3f0cf028cf3efe50dbf99b0cc3.tar.gz
infinitytier-8055635e85beba3f0cf028cf3efe50dbf99b0cc3.zip
VERSION 0.6.5: minor bug fix in peer connection tracking
-rw-r--r--node/Peer.cpp10
-rw-r--r--version.h2
2 files changed, 7 insertions, 5 deletions
diff --git a/node/Peer.cpp b/node/Peer.cpp
index 8c2c9f9b..e7db125d 100644
--- a/node/Peer.cpp
+++ b/node/Peer.cpp
@@ -83,18 +83,20 @@ void Peer::onReceive(
_r->sw->announceMulticastGroups(SharedPtr<Peer>(this));
}
+ // Update last receive info for our direct path
+ WanPath *const wp = (remoteAddr.isV4() ? &_ipv4p : &_ipv6p);
+ wp->lastReceive = now;
+ wp->localPort = ((localPort) ? localPort : Demarc::ANY_PORT);
+
// Do things like learn latency or endpoints on OK or ERROR replies
if (inReVerb != Packet::VERB_NOP) {
for(unsigned int p=0;p<ZT_PEER_REQUEST_HISTORY_LENGTH;++p) {
if ((_requestHistory[p].packetId == inRePacketId)&&(_requestHistory[p].verb == inReVerb)) {
_latency = std::min((unsigned int)(now - _requestHistory[p].timestamp),(unsigned int)0xffff);
- // Only learn paths on replies to packets we have sent, otherwise paths
+ // Only learn paths on replies to packets we have sent, otherwise
// this introduces both an asymmetry problem in NAT-t and a potential
// reply DOS attack.
- WanPath *const wp = (remoteAddr.isV4() ? &_ipv4p : &_ipv6p);
- wp->lastReceive = now;
- wp->localPort = ((localPort) ? localPort : Demarc::ANY_PORT);
if (!wp->fixed)
wp->addr = remoteAddr;
diff --git a/version.h b/version.h
index 5f2762ce..87b1fc17 100644
--- a/version.h
+++ b/version.h
@@ -41,6 +41,6 @@
/**
* Revision
*/
-#define ZEROTIER_ONE_VERSION_REVISION 4
+#define ZEROTIER_ONE_VERSION_REVISION 5
#endif