When generating rdataset, owner name compression is being applied when it should not be
The dns_name_towire2()
takes offset to previous (first) owner name as the last argument which can be use as fast-path for compression pointer. This is used as micro-optimization when generating the rdataset in the answer.
The code completely goes around standard DNS compression tables and it ignores the condition when the compressed path is longer (or equal) than uncompressed path.
Edited by Ondřej Surý