]> git.ipfire.org Git - thirdparty/pdns.git/commit
Do not add request to a wait chain that's already processed or being processed. 9718/head
authorOtto Moerbeek <otto@drijf.net>
Wed, 11 Nov 2020 11:02:50 +0000 (12:02 +0100)
committerOtto Moerbeek <otto@drijf.net>
Fri, 13 Nov 2020 08:49:45 +0000 (09:49 +0100)
commit17cf1b4d041ec7ff7b681c1dff06297343c6c71a
treed8fa55c1f35e302b310441a9f0d230cf6f9d1614
parenta9342bc391b77eb8cb2a7da69c9c19fe496a23ce
Do not add request to a wait chain that's already processed or being processed.

The following scenario can occur. Multiple concurrent clients doing the same query A
are needed to trigger it:

1. Incoming request A, which has a need for request X
2. Add request X to chain because we already have an identical outstanding request
3. We receive the reply for X
4. We process the chain
5. In the meantime a new request for X that's identical is added to the chain
6. The added id in step 5 is not being processed anymore -> timeout

This can happen if request X has TTL 0, otherwise the record cache would have a hit.

(cherry picked from commit c647a254a0f863aabeaea9d33f673afa26c60457)
pdns/mtasker.hh
pdns/pdns_recursor.cc
pdns/syncres.hh