mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2024-12-21 05:53:09 +00:00
Thinko.
This commit is contained in:
parent
bcf8c30ce0
commit
104fade420
@ -273,11 +273,6 @@ static void handlePacket(const int sock,const InetAddress *const ip,Packet &pkt)
|
|||||||
printf("%s HELLO rejected: identity address collision!" ZT_EOL_S,ip->toString(ipstr));
|
printf("%s HELLO rejected: identity address collision!" ZT_EOL_S,ip->toString(ipstr));
|
||||||
// TODO: send error
|
// TODO: send error
|
||||||
return;
|
return;
|
||||||
} else {
|
|
||||||
printf("* invalid identity found and discarded: %s" ZT_EOL_S,id.toString(false, tmpstr));
|
|
||||||
std::lock_guard<std::mutex> p_l(s_peersByVirtAddr_l);
|
|
||||||
s_peersByVirtAddr.erase(source);
|
|
||||||
peer.zero();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -327,6 +322,7 @@ static void handlePacket(const int sock,const InetAddress *const ip,Packet &pkt)
|
|||||||
peer = p->second;
|
peer = p->second;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (peer) {
|
||||||
if (!pkt.dearmor(peer->key)) {
|
if (!pkt.dearmor(peer->key)) {
|
||||||
printf("%s HELLO rejected: packet authentication failed" ZT_EOL_S,ip->toString(ipstr));
|
printf("%s HELLO rejected: packet authentication failed" ZT_EOL_S,ip->toString(ipstr));
|
||||||
return;
|
return;
|
||||||
@ -335,9 +331,11 @@ static void handlePacket(const int sock,const InetAddress *const ip,Packet &pkt)
|
|||||||
printf("%s packet rejected: decompression failed" ZT_EOL_S,ip->toString(ipstr));
|
printf("%s packet rejected: decompression failed" ZT_EOL_S,ip->toString(ipstr));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (likely(peer)) {
|
|
||||||
const int64_t now = OSUtils::now();
|
const int64_t now = OSUtils::now();
|
||||||
|
|
||||||
if (ip->isV4()) {
|
if (ip->isV4()) {
|
||||||
@ -516,7 +514,6 @@ static void handlePacket(const int sock,const InetAddress *const ip,Packet &pkt)
|
|||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// If we made it here, we are forwarding this packet to someone else and also possibly
|
// If we made it here, we are forwarding this packet to someone else and also possibly
|
||||||
// sending a RENDEZVOUS message.
|
// sending a RENDEZVOUS message.
|
||||||
|
Loading…
Reference in New Issue
Block a user