resolved: fix the canonical name returned by hosts lookup by address
authorDmitry V. Levin <ldv@strace.io>
Mon, 10 Jul 2023 08:00:00 +0000 (08:00 +0000)
committerDmitry V. Levin <ldv@strace.io>
Fri, 14 Jul 2023 13:13:53 +0000 (13:13 +0000)
commit0ff8f2a33a8f7c225860388faf43fa83f106cfe3
tree59fb585580d9a7b3f4cfce180761f94a0c720115
parent1bd76a6217c0cd81972cd50b360cd5b8aa27f0ff
resolved: fix the canonical name returned by hosts lookup by address

In etc_hosts_lookup_by_address(), make sure the canonical name of the given
address is returned first in the list of names that address resolves to.

Resolves: #25088
src/resolve/resolved-etc-hosts.c
test/units/testsuite-75.sh