mirror of
https://github.com/systemd/systemd.git
synced 2026-08-05 07:30:30 +00:00
resolve: include current DNS server in JSON again (#40396)
Fixes a regression caused by c6b6ac63ea.
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
@@ -959,6 +959,9 @@ testcase_10_resolvectl_json() {
|
||||
|
||||
assert_eq "$(resolvectl --json=short nta dns0 | jq -rc '.[0].negativeTrustAnchors | .[0]')" 'bar'
|
||||
assert_eq "$(jq -rc '.[0].negativeTrustAnchors | .[0]' "$status_json")" 'bar'
|
||||
|
||||
# Test that currentServer is non-empty.
|
||||
jq -rce '.[0].currentServer' "$status_json"
|
||||
}
|
||||
|
||||
# Test serve stale feature and NFTSet= if nftables is installed
|
||||
|
||||
Reference in New Issue
Block a user