]> git.ipfire.org Git - thirdparty/glibc.git/commit - support/resolv_test.c
resolv: Support binary labels in test framework
authorFlorian Weimer <fweimer@redhat.com>
Mon, 8 Jan 2018 13:33:17 +0000 (14:33 +0100)
committerFlorian Weimer <fweimer@redhat.com>
Mon, 8 Jan 2018 19:07:24 +0000 (20:07 +0100)
commit401311cfba71b61d93d23aa17e5c9ac5fb047d48
treec75e333a4167d782bd22da480b516c6b7e07c9ae
parent2b3aa44656dd873e2753c98fdcb95be6a9d147a6
resolv: Support binary labels in test framework

The old implementation based on hsearch_r used an ad-hoc C string
encoding and produced an incorrect format on the wire for domain
names which contained bytes which needed escaping when printed.

This commit switches to ns_name_pton for the wire format conversion
(now that we have separate tests for it) and uses a tsearch tree
with a suitable comparison function to locate compression targets.
ChangeLog
resolv/Makefile
resolv/tst-resolv-binary.c [new file with mode: 0644]
support/resolv_test.c