From nobody Sun Feb 8 17:44:43 2026 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 1725556186768441.1378681491666; Thu, 5 Sep 2024 10:09:46 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 996) id BF0FE1756; Thu, 5 Sep 2024 13:09:45 -0400 (EDT) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id B2A96179A; Thu, 5 Sep 2024 13:08:15 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 94DCD1751; Thu, 5 Sep 2024 13:08:06 -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 291E7174F for ; Thu, 5 Sep 2024 13:08:06 -0400 (EDT) Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-312-zw5AqezAO1m9S-9XiqMtUw-1; Thu, 05 Sep 2024 13:08:04 -0400 Received: from mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.15]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id A39CB1956069 for ; Thu, 5 Sep 2024 17:08:03 +0000 (UTC) Received: from vhost3.router.laine.org (unknown [10.22.16.247]) by mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 19663195608A for ; Thu, 5 Sep 2024 17:08:02 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on lists.libvirt.org X-Spam-Level: *** X-Spam-Status: No, score=3.0 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,RCVD_IN_SBL_CSS,SPF_HELO_NONE, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1725556085; 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=es5u3aGXElneWHtKGYimkgR9XXZNwH8bGy76tDUstyg=; b=V8Md0GQ0Da+l8cBEehjfJlrgMfTu9i/I7UAyjLDeJ08RktRuRhCl3Qos/AV9Z3y5cnMtHp urtBNoZcCrOr7MDSX3HMKAU9W+U5TzdRs91hu8glCWLvqVqfFFH4iHx4j56E0L2XsifVbW nFWEH7AU51xhXryiAGABzRV4cPas7Wk= X-MC-Unique: zw5AqezAO1m9S-9XiqMtUw-1 From: Laine Stump To: devel@lists.libvirt.org Subject: [PATCH 4/5] network: remove firewalld version check from networkSetBridgeZone() Date: Thu, 5 Sep 2024 13:07:58 -0400 Message-ID: <20240905170759.864299-5-laine@redhat.com> In-Reply-To: <20240905170759.864299-1-laine@redhat.com> References: <20240905170759.864299-1-laine@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.15 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: THENMRUSGDJYLY3NLCNWGJL4CHE3OIH2 X-Message-ID-Hash: THENMRUSGDJYLY3NLCNWGJL4CHE3OIH2 X-MailFrom: laine@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: 1725556187623116600 Content-Type: text/plain; charset="utf-8"; x-default="true" At the time the version check in this function was written, there were still several supported versions of some distros that were using a version of firewalld too old to support the "rich rule priorities" used by the 'libvirt' zone that we installed for firewalld. Today the newest distro that has a version of firewalld < 0.7.0 is RHEL7/CentOS7, so we can remove the complexity and if the libvirt zone is missing simply say "the libvirt zone is missing". Signed-off-by: Laine Stump Reviewed-by: Martin Kletzander --- src/network/bridge_driver_linux.c | 21 +++------------------ 1 file changed, 3 insertions(+), 18 deletions(-) diff --git a/src/network/bridge_driver_linux.c b/src/network/bridge_driver_= linux.c index a6203a712e..af758d4f3d 100644 --- a/src/network/bridge_driver_linux.c +++ b/src/network/bridge_driver_linux.c @@ -381,24 +381,9 @@ networkSetBridgeZone(virNetworkDef *def) if (virFirewallDInterfaceSetZone(def->bridge, "libvirt") <= 0) return -1; } else { - unsigned long long version; - int vresult =3D virFirewallDGetVersion(&version); - - if (vresult < 0) - return -1; - - /* Support for nftables backend was added in firewalld - * 0.6.0. Support for rule priorities (required by the - * 'libvirt' zone, which should be installed by a - * libvirt package, *not* by firewalld) was not added - * until firewalld 0.7.0 (unless it was backported). - */ - if (version >=3D 6000 && - virFirewallDGetBackend() =3D=3D VIR_FIREWALLD_BACKEND_= NFTABLES) { - virReportError(VIR_ERR_INTERNAL_ERROR, "%s", - _("firewalld is set to use the nftables= backend, but the required firewalld 'libvirt' zone is missing. Either set = the firewalld backend to 'iptables', or ensure that firewalld has a 'libvir= t' zone by upgrading firewalld to a version supporting rule priorities (0.7= .0+) and/or rebuilding libvirt with --with-firewalld-zone")); - return -1; - } + virReportError(VIR_ERR_INTERNAL_ERROR, "%s", + _("firewalld can't find the 'libvirt' zone = that should have been installed with libvirt")); + return -1; } } } --=20 2.46.0