From dda10ac8acd0b5ffa03f9659c5678c2bddd9eed4 Mon Sep 17 00:00:00 2001 From: Jiri Denemark Date: Thu, 9 May 2024 16:16:57 +0200 Subject: [PATCH] network: Register dnsmasq with resolved only when really requested MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit An incorrect check for domainRegister caused the DNS server for a virtual domain to be registered with systemd-resolved even if register='no' attribute was present. Only omitting the attribute completely would disable the registration. Reported-by: Daniel P. Berrangé Signed-off-by: Jiri Denemark Reviewed-by: Daniel P. Berrangé --- src/network/bridge_driver.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/network/bridge_driver.c b/src/network/bridge_driver.c index d89700c6ee..e5f9ecf9e8 100644 --- a/src/network/bridge_driver.c +++ b/src/network/bridge_driver.c @@ -2016,7 +2016,9 @@ networkStartNetworkVirtual(virNetworkDriverState *driver, dnsmasqStarted = true; - if (def->domain && def->domainRegister && dnsServer) { + if (def->domain && + def->domainRegister == VIR_TRISTATE_BOOL_YES && + dnsServer) { unsigned int link; int rc;