[PATCH] network: Register dnsmasq with resolved only when really requested

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
Signed-off-by: Jiri Denemark <jdenemar@xxxxxxxxxx>
---
 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
_______________________________________________
Devel mailing list -- devel@xxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxx




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux