mirror of
https://github.com/zeek/zeek.git
synced 2025-10-10 10:38:20 +00:00
Fix timing out DNS lookups that were already resolved
This could happen in the case of making repeated lookup requests for the same thing within a short period of time: cleaning up an old request that already got resolved would mistakenly see a new, yet-to-be-resolved request with identical host/addr and mistakenly assume it's in need of being timed out.
This commit is contained in:
parent
fd11c63efe
commit
46799f7540
2 changed files with 15 additions and 8 deletions
|
@ -1407,12 +1407,15 @@ void DNS_Mgr::DoProcess()
|
|||
if ( req->time + DNS_TIMEOUT > current_time() )
|
||||
break;
|
||||
|
||||
if ( req->IsAddrReq() )
|
||||
CheckAsyncAddrRequest(req->host, true);
|
||||
else if ( req->is_txt )
|
||||
CheckAsyncTextRequest(req->name.c_str(), true);
|
||||
else
|
||||
CheckAsyncHostRequest(req->name.c_str(), true);
|
||||
if ( ! req->processed )
|
||||
{
|
||||
if ( req->IsAddrReq() )
|
||||
CheckAsyncAddrRequest(req->host, true);
|
||||
else if ( req->is_txt )
|
||||
CheckAsyncTextRequest(req->name.c_str(), true);
|
||||
else
|
||||
CheckAsyncHostRequest(req->name.c_str(), true);
|
||||
}
|
||||
|
||||
asyncs_timeouts.pop();
|
||||
delete req;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue