From nobody Fri Apr 26 06:35:45 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1679064636; cv=none; d=zohomail.com; s=zohoarc; b=bQYjdMWah6E8Yb3rQv1fw5dgR4uuuc7sb9fSS3ywp0vrHhFXDP9vFHv6SUiuFUmvpZQrdez7llTyvcPsnoYLQBOva9eSe9NH8lfX7m9jpCmhsETecm35Ry4wELU/7T5qEPGZU0dDQ/aIfeXGvTtRRLfXKYy3aLv/0HeaRVsoXrA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1679064636; h=Content-Type:Content-Transfer-Encoding:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=nD9YE/q1gRis0MIq7PVAFcdHOENmQexbX4cRN2tKNbo=; b=FIuXQt7fKN5HZShxrtmyt9Fe1q6SSk4zCkumH0LvJ0pdlP0QEDySZuKue0p9793k2ZYYyXgTt5zIh106ODXeOv0w2bxY2uND48teiLBZrmur9Gt+JcbcHgtmwfBXVMt2oQBKRsb8QTpP+nMot5qVNroMt1P4SvN3iUauvBcpp08= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 167906463614030.264766736838624; Fri, 17 Mar 2023 07:50:36 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-256-SJIy8_kFMYeYW2y1SEhe_Q-1; Fri, 17 Mar 2023 10:50:33 -0400 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 5202085A588; Fri, 17 Mar 2023 14:50:31 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3E21640282F; Fri, 17 Mar 2023 14:50:31 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 2F7991946597; Fri, 17 Mar 2023 14:50:31 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id ADBB61946587 for ; Thu, 16 Mar 2023 13:21:30 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 8E5DB409AFC3; Thu, 16 Mar 2023 13:21:30 +0000 (UTC) Received: from fedora.. (unknown [10.43.2.118]) by smtp.corp.redhat.com (Postfix) with ESMTP id 33FC9409AFC1 for ; Thu, 16 Mar 2023 13:21:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1679064635; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=nD9YE/q1gRis0MIq7PVAFcdHOENmQexbX4cRN2tKNbo=; b=Gfro8guwVJdHm/2W31SFLeZQFnwQ/LZDfB3nt3ZdRY9bkebad6Oi0cmvxIHtaxMJNay1fP vfoqmGqMI8vQbeqv+nMF30f/PrJkmyHDHjbwzWVNXhvdaBjyPjdk2kzN89cqDO6feOXtBE aAigAZ1DNMjnNHSVj+pPkbj307CqptU= X-MC-Unique: SJIy8_kFMYeYW2y1SEhe_Q-1 X-Original-To: libvir-list@listman.corp.redhat.com From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Subject: [libvirt PATCH] network: do not assume dnsmasq in networkUpdateState Date: Thu, 16 Mar 2023 14:21:27 +0100 Message-Id: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.1 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.10 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1679064637817100001 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=C3=A1n Tomko --- 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); =20 /* Try and read dnsmasq pids of active networks */ - if (virNetworkObjIsActive(obj) && def->ips && (def->nips > 0)) { + if (dnsmasq_caps && virNetworkObjIsActive(obj) && def->ips && (def->ni= ps > 0)) { pid_t dnsmasqPid; =20 if (networkSetMacMap(cfg, obj) < 0) --=20 2.39.2