summaryrefslogtreecommitdiffstats
path: root/src/resolve/resolved-varlink.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-09-16 18:26:40 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-09-16 18:26:40 +0000
commit34f1d05ca3b350257f1d9ddb0aba57f129c27c67 (patch)
treeeccee464f1cccec702d6b9a87f1732c343bd74c2 /src/resolve/resolved-varlink.c
parentAdding debian version 256.4-3. (diff)
downloadsystemd-34f1d05ca3b350257f1d9ddb0aba57f129c27c67.tar.xz
systemd-34f1d05ca3b350257f1d9ddb0aba57f129c27c67.zip
Merging upstream version 256.5.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/resolve/resolved-varlink.c')
-rw-r--r--src/resolve/resolved-varlink.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/resolve/resolved-varlink.c b/src/resolve/resolved-varlink.c
index 25f85d8..f02ebe3 100644
--- a/src/resolve/resolved-varlink.c
+++ b/src/resolve/resolved-varlink.c
@@ -829,6 +829,11 @@ static void resolve_service_all_complete(DnsQuery *query) {
if (r < 0)
goto finish;
+ if (isempty(type)) {
+ r = varlink_error(q->varlink_request, "io.systemd.Resolve.ServiceNotProvided", NULL);
+ goto finish;
+ }
+
r = varlink_replyb(query->varlink_request, JSON_BUILD_OBJECT(
JSON_BUILD_PAIR("services", JSON_BUILD_VARIANT(srv)),
JSON_BUILD_PAIR_CONDITION(!json_variant_is_blank_object(txt), "txt", JSON_BUILD_VARIANT(txt)),