]> git.ipfire.org Git - thirdparty/pdns.git/commit
Fix serve-stale loop logic. 12610/head
authorOtto Moerbeek <otto.moerbeek@open-xchange.com>
Fri, 3 Mar 2023 08:44:06 +0000 (09:44 +0100)
committerOtto Moerbeek <otto.moerbeek@open-xchange.com>
Fri, 3 Mar 2023 08:44:06 +0000 (09:44 +0100)
commit9024d3f6fcb4f53591922f28aa88a800fa3ab974
tree3d0fde56836e9145bde87bd49d66ffb25ff64e17
parent48b0d702f37960cec67eb8a4074dea549276d95b
Fix serve-stale loop logic.

There are several issues here: we do not want to retry on an exception
ever as an exception indicates a final failure. e.g. a resolution
timeout for the whole query. Recursing in that state will generate
an exception storm. Individual timeouts of contacting a nameserver
do not generate an exception.  Also, we do not want to recurse if
the cache lookup for stale records did not produce anything in the
second iteration, we know it's probably going to be fatal and it
requires (portentially) a lot of work to find out.

This solves CPU pegging seen.
pdns/recursordist/syncres.cc
pdns/recursordist/test-syncres_cc10.cc