dns-configuration: dispatch fallback servers to DNSConfiguration

This is one of several commits to dispatch all fields of the
DNSConfiguration JSON.
This commit is contained in:
Nick Rosbrook
2026-02-03 15:07:41 -05:00
parent fb0bd15d15
commit d3b60567d7
2 changed files with 3 additions and 1 deletions
+2 -1
View File
@@ -157,6 +157,7 @@ DNSConfiguration* dns_configuration_free(DNSConfiguration *c) {
dns_server_free(c->current_dns_server);
set_free(c->dns_servers);
set_free(c->search_domains);
set_free(c->fallback_dns_servers);
free(c->ifname);
free(c->dnssec_mode_str);
free(c->dns_over_tls_mode_str);
@@ -186,10 +187,10 @@ static int dispatch_dns_configuration(const char *name, sd_json_variant *variant
{ "dnsOverTLS", SD_JSON_VARIANT_STRING, sd_json_dispatch_string, offsetof(DNSConfiguration, dns_over_tls_mode_str), 0 },
{ "llmnr", SD_JSON_VARIANT_STRING, sd_json_dispatch_string, offsetof(DNSConfiguration, llmnr_mode_str), 0 },
{ "mDNS", SD_JSON_VARIANT_STRING, sd_json_dispatch_string, offsetof(DNSConfiguration, mdns_mode_str), 0 },
{ "fallbackServers", SD_JSON_VARIANT_ARRAY, dispatch_dns_server_array, offsetof(DNSConfiguration, fallback_dns_servers), 0 },
/* The remaining fields are currently unused by wait-online. */
{ "delegate", _SD_JSON_VARIANT_TYPE_INVALID, NULL, 0, 0 },
{ "fallbackServers", _SD_JSON_VARIANT_TYPE_INVALID, NULL, 0, 0 },
{ "negativeTrustAnchors", _SD_JSON_VARIANT_TYPE_INVALID, NULL, 0, 0 },
{ "resolvConfMode", _SD_JSON_VARIANT_TYPE_INVALID, NULL, 0, 0 },
{ "scopes", _SD_JSON_VARIANT_TYPE_INVALID, NULL, 0, 0 },
+1
View File
@@ -33,6 +33,7 @@ typedef struct DNSConfiguration {
DNSServer *current_dns_server;
Set *dns_servers;
Set *search_domains;
Set *fallback_dns_servers;
char *dnssec_mode_str;
char *dns_over_tls_mode_str;
char *llmnr_mode_str;