]> git.ipfire.org Git - thirdparty/pdns.git/commit
Do not add request to a wait chain that's already processed or being processed. 9707/head
authorOtto Moerbeek <otto@drijf.net>
Wed, 11 Nov 2020 11:02:50 +0000 (12:02 +0100)
committerOtto Moerbeek <otto@drijf.net>
Wed, 11 Nov 2020 11:18:06 +0000 (12:18 +0100)
commitc647a254a0f863aabeaea9d33f673afa26c60457
tree22e939b1dae71a8b6a668a4c50eb0efd417b00c1
parentb69e4b7189e4881eeeba454cc16c4bd29fafeb31
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.
pdns/mtasker.hh
pdns/pdns_recursor.cc
pdns/syncres.hh