Skip to content

CNAME chasing: fix infinite looping

Marc van der Wal requested to merge vanderwal/ibdns:bugfix/#28 into develop

Consider a query to some.test (except ANY or CNAME) with the following zone file:

$ORIGIN some.test.
@        IN  CNAME  x
*        IN  CNAME  y

If rewrite_wildcard_owner_names is set to false, this could result in the server entering an infinite loop.

This commit fixes the CNAME-chasing logic to always record a history of QNAMEs (i.e. the actual names being searched when chasing CNAMEs), not the names of the aliases. This removes some redundancy in the code and fixes this bug at the same time.

Fixes #28 (closed).

Edited by Marc van der Wal

Merge request reports