From: Nick Rosbrook Date: Mon, 19 Jan 2026 18:29:52 +0000 (-0500) Subject: resolve: include current DNS server in JSON again X-Git-Tag: v260-rc1~353^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d990b426b9879cfe37e5abfcf786413647e8b91b;p=thirdparty%2Fsystemd.git 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"). --- diff --git a/src/resolve/resolved-manager.c b/src/resolve/resolved-manager.c index df0b2213bef..95e635d8527 100644 --- a/src/resolve/resolved-manager.c +++ b/src/resolve/resolved-manager.c @@ -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, ¤t_dns_server_json); + if (r < 0) + return r; + } + SET_FOREACH(scope, dns_scopes) { _cleanup_(sd_json_variant_unrefp) sd_json_variant *v = NULL;