[libvirt PATCH] network: do not assume dnsmasq in networkUpdateState

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

 



If we don't have dnsmasq, it's pointless to try to find
its pidfile.

Also, dnsmasqCapsGetBinaryPath would access a NULL pointer.

Fixes: 4b68c982e283471575bacbf87302495864da46fe
Foxes: https://gitlab.com/libvirt/libvirt/-/issues/456
Signed-off-by: Ján Tomko <jtomko@xxxxxxxxxx>
---
 src/network/bridge_driver.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/network/bridge_driver.c b/src/network/bridge_driver.c
index 3fa56bfc09..ee4bbd4a93 100644
--- a/src/network/bridge_driver.c
+++ b/src/network/bridge_driver.c
@@ -492,7 +492,7 @@ networkUpdateState(virNetworkObj *obj,
     virNetworkObjPortForEach(obj, networkUpdatePort, obj);
 
     /* Try and read dnsmasq pids of active networks */
-    if (virNetworkObjIsActive(obj) && def->ips && (def->nips > 0)) {
+    if (dnsmasq_caps && virNetworkObjIsActive(obj) && def->ips && (def->nips > 0)) {
         pid_t dnsmasqPid;
 
         if (networkSetMacMap(cfg, obj) < 0)
-- 
2.39.2




[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