Commit Message

Before this change, the loop iterating over RRs in the answer
section stopped at the first CNAME record, never printing them.
The CNAME and PTR record contents was extracted from the wrong
buffer (whole packet instead RDATA). This desynced the parsing
after the first CNAME or PTR record.
2017-03-13 Florian Weimer <fweimer@redhat.com>
* support/support_format_dns_packet.c (support_format_dns_packet):
Handle CNAME records in the response. Extract RDATA names from
rdata, not the whole packet.
* support/tst-support_format_dns_packet.c: New file.
* support/Makefile (tests): Add tst-support_format_dns_packet.
(tst-support_format_dns_packet): Link against libresolv.