mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-02-01 16:58:09 +00:00
crash fix
This commit is contained in:
parent
6e3e09bed4
commit
ee7361ee2e
@ -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…
x
Reference in New Issue
Block a user