]> git.ipfire.org Git - thirdparty/pdns.git/commit
Correct depth increments. 9192/head
authorOtto Moerbeek <otto.moerbeek@open-xchange.com>
Wed, 3 Jun 2020 07:07:56 +0000 (09:07 +0200)
committerOtto Moerbeek <otto.moerbeek@open-xchange.com>
Wed, 3 Jun 2020 07:15:21 +0000 (09:15 +0200)
commita06745426b4df4d3946c36cd3429a5c8db9a8cd0
tree50ed501066d6fd736a7294e56fa2198c25e889a0
parent07f37f2f9eb7ac50a4e4d3b93e1d19c75c82f90c
Correct depth increments.

With the introduction of qname minimization, a function
doResolveNoQNameMinimization() was introduced. This function is
called by doResolve() with depth incremented. Due to the recursive
nature of the resursor algortihm (Nomen est Omen) we end up
incrementing the depth too much. This prompted a review of the other
places depth was incremented, and I believe it should only be done
when calling doResolve(). Especially the case "+ 2" in the getAddrs()
call looks strange to me, as the doResolve() calls in getAddrs()
already call doResolve() with depth + 1.

This fixes #9184 and likely other cases of deep recursion caused
by long CNAME chains.
pdns/recursordist/test-syncres_cc2.cc
pdns/syncres.cc