From nobody Sun Dec 22 06:27:45 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1725374217830628.7289837636288; Tue, 3 Sep 2024 07:36:57 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 996) id B3FF714CF; Tue, 3 Sep 2024 10:36:56 -0400 (EDT) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id 716571248; Tue, 3 Sep 2024 10:36:38 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 9C106D8F; Tue, 3 Sep 2024 10:36:35 -0400 (EDT) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id 37BF511ED for ; Tue, 3 Sep 2024 10:36:35 -0400 (EDT) Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-258-TLLVUn4PNcm61ayu6Ge4vA-1; Tue, 03 Sep 2024 10:36:33 -0400 Received: by mail-wm1-f71.google.com with SMTP id 5b1f17b1804b1-42bac946976so50225445e9.2 for ; Tue, 03 Sep 2024 07:36:33 -0700 (PDT) Received: from wheatley.localdomain (nat-pool-brq-t.redhat.com. [213.175.37.10]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42c800554d6sm90765275e9.43.2024.09.03.07.36.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Sep 2024 07:36:31 -0700 (PDT) Received: from wheatley.brq.redhat.com (wheatley.k8r.cz [127.0.0.1]) by wheatley.localdomain (Postfix) with ESMTP id 17C2C1FC90B9 for ; Tue, 03 Sep 2024 16:36:31 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1725374194; h=from:from: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: in-reply-to:in-reply-to:references:references; bh=jqGyL9QQTGSwV5yRjGb978x8TTT8owWAVxXv8aqPWak=; b=NC/riFU56iij7HkfFgt4EnC38k8WaUuEQnfCRrsyUQwOo+6QlbThYKc5O6uS4F6BNECCcD G4xF4Q3N3hPxqolPH8Nj5v26IJv6z0TyNh2Cdzfy6txi37N8WApUM3KgnCihgj0pdKx9fr xY4/UyJ6VldjYXj/5NwVKrhLOW6DEIg= X-MC-Unique: TLLVUn4PNcm61ayu6Ge4vA-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725374192; x=1725978992; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=jqGyL9QQTGSwV5yRjGb978x8TTT8owWAVxXv8aqPWak=; b=dOUMTJe29dlUdLlW+qhsAKpOAhfEJAFZCohnCib6222W9Z8TxzC2uyH5SIXKEgcQna bY+ZljiICBx8vsEKu/jETSY79xZ/ng0UvTokp3oB8Ob5CMg4Z0LS4aWtlfEWMunF7y6O swSNdYUaU2vu1x76GiNewq/OExKFko/lNoHnnvf44p4Cp8BP05Fu/UgthuTewlBhpawL Dsix6faA853BOv4N3vsFnrhVuJ9WD7nW2vk7OAsAAIzwvaR83pCu5nGw7PvWi3snqZ3n 5c1iqjz41OjIO0eyG21JbaEEaBP5yj5a7K5DlteDKAuF2Jb4zm1pn4B812iecHSgxKsH ONSQ== X-Gm-Message-State: AOJu0YzrnqIoAZ5FkSsuRrCNIoGaQGWSv0+si4SFkdRdFnWhNk1t06Av 2i2c3qbmCp1mNYWaIMyQZOi+tpogqdCOaFezdEvLVq/D7cBimXcrEUvFE3SBYruwMbpVOjJnPa3 vW+ufedscPFS2wmEWHtrxIa0xVnVilVRgl9Sr870uo1LEyQv7MbtryJm8PiafxHWEjGyryUd94m VcXejbnlGIqZH0uHwXpKWIMh4qqUCwEj48pv8l0VU= X-Received: by 2002:a05:600c:4685:b0:428:150e:4f13 with SMTP id 5b1f17b1804b1-42bb27bc4cbmr116780145e9.33.1725374192533; Tue, 03 Sep 2024 07:36:32 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFuiC4er+QvlkIGY9wlPozuG2buv4f321SmuzF5plas+hQaPHDQlwXB/QsUOP95+qgf32zpVA== X-Received: by 2002:a05:600c:4685:b0:428:150e:4f13 with SMTP id 5b1f17b1804b1-42bb27bc4cbmr116779905e9.33.1725374191767; Tue, 03 Sep 2024 07:36:31 -0700 (PDT) From: Martin Kletzander To: devel@lists.libvirt.org Subject: [PATCH 1/8] network: Do not update network ports for inactive networks Date: Tue, 3 Sep 2024 16:36:20 +0200 Message-ID: <64fd916836e06e38f15da6302d6b5dd18dfe39f1.1725373964.git.mkletzan@redhat.com> X-Mailer: git-send-email 2.46.0 In-Reply-To: References: MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: I7ZNU4RNQFKDV7FM4SUNE5GGPXGVVJP4 X-Message-ID-Hash: I7ZNU4RNQFKDV7FM4SUNE5GGPXGVVJP4 X-MailFrom: mkletzan@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1; header-match-config-2; header-match-config-3; header-match-devel.lists.libvirt.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.2.2 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1725374220183116600 Content-Type: text/plain; charset="utf-8"; x-default="true" The semantic does not change since inside networkUpdatePort() (well, networkNotifyPort, for which the former is a wrapper) exits for inactive networks, but with an error we can easily avoid with this patch. Signed-off-by: Martin Kletzander Reviewed-by: Laine Stump --- src/network/bridge_driver.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/network/bridge_driver.c b/src/network/bridge_driver.c index 915211d1b590..5b510a222cd2 100644 --- a/src/network/bridge_driver.c +++ b/src/network/bridge_driver.c @@ -489,7 +489,8 @@ networkUpdateState(virNetworkObj *obj, return -1; } =20 - virNetworkObjPortForEach(obj, networkUpdatePort, obj); + if (virNetworkObjIsActive(obj)) + virNetworkObjPortForEach(obj, networkUpdatePort, obj); =20 /* Try and read dnsmasq pids of active networks */ if (virNetworkObjIsActive(obj) && def->ips && (def->nips > 0)) { --=20 2.46.0