resolved: fix ResolveService() hostname handling
authorLennart Poettering <lennart@poettering.net>
Mon, 22 Nov 2021 13:37:54 +0000 (14:37 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 11 Jan 2022 17:46:28 +0000 (18:46 +0100)
commit70f465cb5d10b7bcd7bd7c326756d542e59c0e0b
tree049f88c999be49391d724b9efa5589b25a9d8354
parentf95f68306398c741e759fe0c186b838b5d79219a
resolved: fix ResolveService() hostname handling

Let's eat up special returns of dns_query_process_cname_many() when
storing hostname resolution results.

The rest of the code assumes only == 0 means success and != 0 means
error, but so far > 0 also could mean success, let's fix that.

Fixes: #21365 #21140

(This was originally broken in 1db8e6d1db0880de240e5598e28d24d708479434)

(cherry picked from commit 5a78106ad92d3f122f7ac653eecf767f0a8948cf)
src/resolve/resolved-bus.c