]> git.ipfire.org Git - thirdparty/pdns.git/commit
Correct depth increments. 9247/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>
Tue, 16 Jun 2020 13:48:02 +0000 (15:48 +0200)
commit70c63215c220484cf0472db87f8801c74c826669
treeac94c990e639bf169a2f5eb9e83e89d8ed821d91
parentbb26e698048449e10374b4dc2cd517db1fd3bc49
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.

(cherry picked from commit a06745426b4df4d3946c36cd3429a5c8db9a8cd0)
pdns/recursordist/test-syncres_cc2.cc
pdns/syncres.cc