mirror of
https://github.com/ZeroTier/ZeroTierOne
synced 2025-07-14 00:53:21 -07:00
Work in progress...
This commit is contained in:
parent
ae93c95151
commit
fd2b383c3e
4 changed files with 307 additions and 262 deletions
|
@ -43,7 +43,7 @@ Peer::Peer(const Identity &myIdentity,const Identity &peerIdentity)
|
|||
throw std::runtime_error("new peer identity key agreement failed");
|
||||
}
|
||||
|
||||
void Peer::onReceive(const RuntimeEnvironment *_r,Demarc::Port localPort,const InetAddress &fromAddr,unsigned int latency,unsigned int hops,Packet::Verb verb,uint64_t now)
|
||||
void Peer::onReceive(const RuntimeEnvironment *_r,Demarc::Port localPort,const InetAddress &fromAddr,unsigned int hops,Packet::Verb verb,uint64_t now)
|
||||
{
|
||||
if (!hops) { // direct packet
|
||||
WanPath *wp = (fromAddr.isV4() ? &_ipv4p : &_ipv6p);
|
||||
|
@ -51,8 +51,6 @@ void Peer::onReceive(const RuntimeEnvironment *_r,Demarc::Port localPort,const I
|
|||
wp->lastReceive = now;
|
||||
if (verb == Packet::VERB_FRAME)
|
||||
wp->lastUnicastFrame = now;
|
||||
if (latency)
|
||||
wp->latency = latency;
|
||||
wp->localPort = localPort;
|
||||
if (!wp->fixed)
|
||||
wp->addr = fromAddr;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue