support_format_dns_packet: Fix CNAME and multiple RR handling
authorFlorian Weimer <fweimer@redhat.com>
Wed, 15 Mar 2017 11:57:12 +0000 (12:57 +0100)
committerFlorian Weimer <fweimer@redhat.com>
Wed, 15 Mar 2017 12:33:40 +0000 (13:33 +0100)
commitf889e73f603dcf90b4db6a2065104a78c1a0e94d
treee70508fa8cde79e40fcc965f28eea7fdfc11916a
parented7d6072f25f75b808b40c206371361f1313f342
support_format_dns_packet: Fix CNAME and multiple RR handling

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.

Also fix the AAAA record parsing by checking their sizes.
ChangeLog
support/Makefile
support/support_format_dns_packet.c
support/tst-support_format_dns_packet.c [new file with mode: 0644]