From nobody Sat Dec 21 15:01:31 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 1725374251223864.8449608717659; Tue, 3 Sep 2024 07:37:31 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 1541E128C; Tue, 3 Sep 2024 10:37:30 -0400 (EDT) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id CF840139C; Tue, 3 Sep 2024 10:36:43 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 1C3591211; Tue, 3 Sep 2024 10:36:36 -0400 (EDT) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.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 A26F61207 for ; Tue, 3 Sep 2024 10:36:35 -0400 (EDT) Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-393-TMpFyh2PNdCFKm7_M2bNuQ-1; Tue, 03 Sep 2024 10:36:34 -0400 Received: by mail-wm1-f70.google.com with SMTP id 5b1f17b1804b1-42ac185e26cso49818975e9.3 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-42bb6e2737dsm173003805e9.29.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 3CEA01FC90BC 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_H3,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=1725374195; 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=EsmAddusS+N64d1JZASWU+iA3EUUXqUND7ALLRSbHKs=; b=Z9LWGpEry3zxzR4mZ+To333YXrQQv/cD9HFopL9PTS7qkadohJo4Syd5d0Qa+pnTJjTQXV hehjdNnPGWdW5lryUZ8Za0WPcp3bOYVph6O2wVTuOJA7cgA/CQr9BEC0OnnQTWzm523MBJ bSb5KgSfgMA0L+UlnK42u1gssgzrRxo= X-MC-Unique: TMpFyh2PNdCFKm7_M2bNuQ-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725374193; x=1725978993; 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=EsmAddusS+N64d1JZASWU+iA3EUUXqUND7ALLRSbHKs=; b=NZoxwxPw6eDLoesETrZmjGNfiBnLBaOreslExVSD2L0P+xVcs2uKAT6SlhCDF5vRGf z6UbV2xA1YuERFJ7gm4u30b23xygXSsWf4nvbQ2qGndnhCrc+urNkwVF2D06UqvJ14D+ dOscGy/PkxdeccS25O57KfHLv4z/a/9kcB7F6YnwkJSIrcwpQR9yDCXohMm2a27aTNWd Z+1BUPcR3FH+vb8BeaNLhuZb3vBtxjbIPL+7ZDSuUA9qJJPmXTu1lgsxSauIOgVm+Hxo AGa9lkcEX1P9EUBcdZxsoT2mbR364S3MPhmtHtk0RqBx+Bp8dRbP0W/3QPKDOQjMY8TG tUDg== X-Gm-Message-State: AOJu0YxlsmkB3RFxEz4vniN4mDDuREEWdkh8gqlOoUkmsQLwixvotw4x o3XnraSReZiFQ4NVKFyYLHMkhKQPhIwas50MuU4Eyqd3ATwYwP+pXL+V9m/HQVh5nQ3EJxG3m1m 3ADR7oQzRsKvJB+hj/o2ZEo0EGpfsNCmzyZbFJsaZVPmXMXO5x39+/Ln4TGpnLhvuRc1bZ2XVrt rdoZPm28Y4adO8SvFQLE9a7nFdT4fyZttlW7OAluY= X-Received: by 2002:a05:600c:1d85:b0:426:6f62:3bc1 with SMTP id 5b1f17b1804b1-42bbb10d2c8mr102644505e9.5.1725374192930; Tue, 03 Sep 2024 07:36:32 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHDZn4fOSJMppZ8ZF1N2simaiuX2+7tVSZPp/8R1ljQGjrdKB62HdAt9UfhAEuRKmGin6G0uQ== X-Received: by 2002:a05:600c:1d85:b0:426:6f62:3bc1 with SMTP id 5b1f17b1804b1-42bbb10d2c8mr102644235e9.5.1725374192211; Tue, 03 Sep 2024 07:36:32 -0700 (PDT) From: Martin Kletzander To: devel@lists.libvirt.org Subject: [PATCH 4/8] network: Don't check if network is active in networkShutdownNetwork Date: Tue, 3 Sep 2024 16:36:23 +0200 Message-ID: <6ef41a47d1d7694bc3fcc0e12ddf737909a37593.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: S37JGEC2MSIYZ5JBQ34AIPWOXLQILY3U X-Message-ID-Hash: S37JGEC2MSIYZ5JBQ34AIPWOXLQILY3U 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: 1725374252097116600 Content-Type: text/plain; charset="utf-8"; x-default="true" It skips the cleanup from networkStartNetwork and the only other path already checks if the network is active or not. Signed-off-by: Martin Kletzander Reviewed-by: Laine Stump --- src/network/bridge_driver.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/network/bridge_driver.c b/src/network/bridge_driver.c index d27a7e9b88c4..e507dcd4c5c9 100644 --- a/src/network/bridge_driver.c +++ b/src/network/bridge_driver.c @@ -2405,9 +2405,6 @@ networkShutdownNetwork(virNetworkDriverState *driver, =20 VIR_INFO("Shutting down network '%s'", def->name); =20 - if (!virNetworkObjIsActive(obj)) - return 0; - stateFile =3D virNetworkConfigFile(cfg->stateDir, def->name); if (!stateFile) return -1; --=20 2.46.0