From nobody Sat Feb 7 03:30:34 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 1725556107940847.2277333885455; Thu, 5 Sep 2024 10:08:27 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 996) id B58D617B6; Thu, 5 Sep 2024 13:08:26 -0400 (EDT) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id 37932175A; Thu, 5 Sep 2024 13:08:08 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 996) id E7F941754; Thu, 5 Sep 2024 13:08:04 -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 DEF421750 for ; Thu, 5 Sep 2024 13:08:03 -0400 (EDT) Received: from mx-prod-mc-05.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-433-0zDlFP1ZMkuVUF2aqu_9pw-1; Thu, 05 Sep 2024 13:08:02 -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-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 97A0D1955F44 for ; Thu, 5 Sep 2024 17:08:01 +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 D44651956086 for ; Thu, 5 Sep 2024 17:08:00 +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_H3,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=1725556083; 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=c/ehIsgm2hwGS+aiMMxorJJJvfno1jxYwXZzRwDWwK0=; b=BUfx1VBCTFDTtj4ecdIOr+rkmWQR/loc9dU3NoLex33W8kn03qZCg3mykFJmjycWZ1e6pb hQmPkTNVSQghQAXiV2xiDd2rsXmrugPdCQk6tFXCSoD/BGXPmK4SfoGP1QY3LKXdeFAXwp Eb1kaE+XlulW+L33647bnLmtCyfneT0= X-MC-Unique: 0zDlFP1ZMkuVUF2aqu_9pw-1 From: Laine Stump To: devel@lists.libvirt.org Subject: [PATCH 1/5] network: permit when a network has no IP address Date: Thu, 5 Sep 2024 13:07:55 -0400 Message-ID: <20240905170759.864299-2-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: JHPMC74DEND6M2ZWDQGO7GMYKCXQ7VIE X-Message-ID-Hash: JHPMC74DEND6M2ZWDQGO7GMYKCXQ7VIE 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: 1725556109787116600 Content-Type: text/plain; charset="utf-8"; x-default="true" The whole point of is to supress libvirt from adding any firewall rules for a network, and someone might want to create a network with no IP address (i.e. they don't want the guests to have connectivity to the host via this interface) and no firewall rules (they don't want any, or they want to add their own). So there's no reason to fail when a network has and also has no IP address. Kind-of-Resolves: https://gitlab.com/libvirt/libvirt/-/issues/588 Signed-off-by: Laine Stump Reviewed-by: Martin Kletzander --- src/conf/network_conf.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/conf/network_conf.c b/src/conf/network_conf.c index 5cf419acf1..3383906c58 100644 --- a/src/conf/network_conf.c +++ b/src/conf/network_conf.c @@ -1789,7 +1789,6 @@ virNetworkDefParseXML(xmlXPathContextPtr ctxt, =20 case VIR_NETWORK_FORWARD_ROUTE: case VIR_NETWORK_FORWARD_NAT: - case VIR_NETWORK_FORWARD_OPEN: /* It's pointless to specify L3 forwarding without specifying * the network we're on. */ @@ -1806,7 +1805,9 @@ virNetworkDefParseXML(xmlXPathContextPtr ctxt, def->name); return NULL; } + break; =20 + case VIR_NETWORK_FORWARD_OPEN: if (def->forward.type =3D=3D VIR_NETWORK_FORWARD_OPEN && def->forw= ard.nifs) { /* an open network by definition can't place any restrictions * on what traffic is allowed or where it goes, so specifying --=20 2.46.0