resolve: include current DNS server in JSON again

The current_dns_server_json object in dns_configuration_json_append() is
always NULL, because the logic to dump the current DNS server to JSON
was removed by mistake in a re-factoring commit. Add that logic back.

Fixes c6b6ac63ea ("resolve: drop unnecessary preparation of empty arrays").
This commit is contained in:
Nick Rosbrook
2026-01-19 13:29:52 -05:00
parent 8a5fb3627a
commit d990b426b9
+6
View File
@@ -2071,6 +2071,12 @@ static int dns_configuration_json_append(
assert(configuration);
if (current_dns_server) {
r = dns_server_dump_configuration_to_json(current_dns_server, &current_dns_server_json);
if (r < 0)
return r;
}
SET_FOREACH(scope, dns_scopes) {
_cleanup_(sd_json_variant_unrefp) sd_json_variant *v = NULL;