From: Nick Rosbrook Date: Fri, 30 Jan 2026 19:34:16 +0000 (-0500) Subject: dns-configuration: dispatch fallback servers to DNSConfiguration X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d3b60567d7b56050cb97aa784e6a6093840eff5d;p=thirdparty%2Fsystemd.git dns-configuration: dispatch fallback servers to DNSConfiguration This is one of several commits to dispatch all fields of the DNSConfiguration JSON. --- diff --git a/src/shared/dns-configuration.c b/src/shared/dns-configuration.c index 03c4f3e2f13..e79ecdd24f8 100644 --- a/src/shared/dns-configuration.c +++ b/src/shared/dns-configuration.c @@ -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 }, diff --git a/src/shared/dns-configuration.h b/src/shared/dns-configuration.h index 9e2addd0a07..8372fa86aae 100644 --- a/src/shared/dns-configuration.h +++ b/src/shared/dns-configuration.h @@ -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;