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é <berrange(a)redhat.com>
Signed-off-by: Jiri Denemark <jdenemar(a)redhat.com>
---
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;
--
2.45.0