mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-06-07 04:53:44 +02:00
crash fix
This commit is contained in:
parent
6e3e09bed4
commit
ee7361ee2e
1 changed files with 40 additions and 38 deletions
|
@ -336,6 +336,7 @@ static void handlePacket(const int sock,const InetAddress *const ip,Packet &pkt)
|
|||
if (introduce) {
|
||||
std::lock_guard<std::mutex> l(peersByVirtAddr_l);
|
||||
auto sources = peersByVirtAddr.find(source);
|
||||
if (sources != peersByVirtAddr.end()) {
|
||||
for(auto a=sources->second.begin();a!=sources->second.end();++a) {
|
||||
for(auto b=toAddrs.begin();b!=toAddrs.end();++b) {
|
||||
if (((*a)->ip6 == *ip)&&(b->second->ip6)) {
|
||||
|
@ -382,6 +383,7 @@ static void handlePacket(const int sock,const InetAddress *const ip,Packet &pkt)
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (fragment) {
|
||||
if (reinterpret_cast<Packet::Fragment *>(&pkt)->incrementHops() >= ZT_PROTO_MAX_HOPS) {
|
||||
|
|
Loading…
Add table
Reference in a new issue