From: Nick Rosbrook Date: Fri, 30 Jan 2026 19:34:22 +0000 (-0500) Subject: dns-configuration: dispatch resolv conf mode to DNSConfiguration X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e90180f50c6817f79d1cfb7a8e0aefccd7fbb72e;p=thirdparty%2Fsystemd.git dns-configuration: dispatch resolv conf mode 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 2fa9d10f885..16301d585f0 100644 --- a/src/shared/dns-configuration.c +++ b/src/shared/dns-configuration.c @@ -164,6 +164,7 @@ DNSConfiguration* dns_configuration_free(DNSConfiguration *c) { free(c->dns_over_tls_mode_str); free(c->llmnr_mode_str); free(c->mdns_mode_str); + free(c->resolv_conf_mode_str); strv_free(c->negative_trust_anchors); return mfree(c); @@ -191,10 +192,10 @@ static int dispatch_dns_configuration(const char *name, sd_json_variant *variant { "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 }, { "negativeTrustAnchors", SD_JSON_VARIANT_ARRAY, sd_json_dispatch_strv, offsetof(DNSConfiguration, negative_trust_anchors), 0 }, + { "resolvConfMode", SD_JSON_VARIANT_STRING, sd_json_dispatch_string, offsetof(DNSConfiguration, resolv_conf_mode_str), 0 }, /* The remaining fields are currently unused by wait-online. */ { "delegate", _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 0b337c58b20..53192ad5968 100644 --- a/src/shared/dns-configuration.h +++ b/src/shared/dns-configuration.h @@ -39,6 +39,7 @@ typedef struct DNSConfiguration { char *llmnr_mode_str; char *mdns_mode_str; char **negative_trust_anchors; + char *resolv_conf_mode_str; } DNSConfiguration; DNSConfiguration* dns_configuration_free(DNSConfiguration *c);