From nobody Sat May 18 08:35:50 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=1661863450; cv=none; d=zohomail.com; s=zohoarc; b=VvR/OPfnHIF0TH7ZavErpFd0/Z3h0YW+S+Ikc7IVQOn77A4vUGs0KQi8IJ7Hb2kFJjJNxPIAvEymbqSujgxDoR/9NPczHotlEACpqnaawSRp3QtbvA1lVYWxJecwUSEC0qgMAiQLzVxvbtuzIMXxXekuyA4eahYxnG2WZEGwLvA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1661863450; 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=BmIDM5wq8HcN15rEKQfKVYS2jlxYwo0TFGf9nedFPBc=; b=ZVyhIOSJRGSYf1yp76OjArBC0M9NVj5VmqCaNj5Vyv+4rfP1UTAEZKS1p5EoQisOUExhWZ0ULBkNxdCKrJhg1KXxFEr8TD7uezkgTw2g0r68oNPm3RXtib0OxoofMqMeeh4vhc+McCBMAnEAcKo4kwP40PmziYdqsK1gawePD0o= 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 1661863450511750.8043051062732; Tue, 30 Aug 2022 05:44:10 -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-660-dHDcFi7VPyarlNxLr9PMKw-1; Tue, 30 Aug 2022 08:44:07 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 5CDE8805AF5; Tue, 30 Aug 2022 12:44:05 +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 AE5FF4010D42; Tue, 30 Aug 2022 12:44:03 +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 7EDC91946A42; Tue, 30 Aug 2022 12:44:03 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 0DBED1946A40 for ; Tue, 30 Aug 2022 12:44:02 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id A73B12026D64; Tue, 30 Aug 2022 12:44:02 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast07.extmail.prod.ext.rdu2.redhat.com [10.11.55.23]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A3B562026D4C for ; Tue, 30 Aug 2022 12:44:02 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 88D1C3C11727 for ; Tue, 30 Aug 2022 12:44:02 +0000 (UTC) Received: from mail-ed1-f72.google.com (mail-ed1-f72.google.com [209.85.208.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-378-uWqR97LFNTWVQh-yN1ULyA-1; Tue, 30 Aug 2022 08:43:58 -0400 Received: by mail-ed1-f72.google.com with SMTP id m15-20020a056402430f00b00448af09b674so1996050edc.13 for ; Tue, 30 Aug 2022 05:43:58 -0700 (PDT) Received: from wheatley.localdomain (nat-pool-brq-t.redhat.com. [213.175.37.10]) by smtp.gmail.com with ESMTPSA id n11-20020aa7db4b000000b004482dd03fe8sm5183600edt.91.2022.08.30.05.43.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Aug 2022 05:43:56 -0700 (PDT) Received: from wheatley.redhat.com (wheatley.k8r.cz [127.0.0.1]) by wheatley.localdomain (Postfix) with ESMTP id D343C91E4B29; Tue, 30 Aug 2022 14:43:55 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1661863449; 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=BmIDM5wq8HcN15rEKQfKVYS2jlxYwo0TFGf9nedFPBc=; b=fv3UbheyzWa8jwZ4pxJYIR9CRgHoFkNLs+9/ZFsnDZSYawkMAgbBZTcM281o6orGL80VOw C0cfwKhbhpUxg9Q2HWjrTjBsDYOvqlQpiepqnAAF9BuwiWTlDq1C2I5oNfz0G/FLJ7BoZH gwqwVl6K9V+zB8N15d0F0zc/1fpdFdQ= X-MC-Unique: dHDcFi7VPyarlNxLr9PMKw-1 X-Original-To: libvir-list@listman.corp.redhat.com X-MC-Unique: uWqR97LFNTWVQh-yN1ULyA-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc; bh=BmIDM5wq8HcN15rEKQfKVYS2jlxYwo0TFGf9nedFPBc=; b=KrrDD5daVyo+fKNt0wXwGX/OjFJAUWo8vq/Oe/b5+CBwh+SPrxUQUUD7GxD5+s08cG dMmB6J4j3N6mt0aVJjUIjRCswrvwc0yhAyIpiMx82HV+FmK/kibaFjFKl4EZI9pIZEn5 SK/FlfUeDPUbjIHrPXdVKugy/IzZ38TjRKrxZlJa6n2m1Jnee2AWM62nwwMin1eJbbTB ZilE/GPQn7CqGmH7uz/onw3BNBdJ3WyP6AFRdqqX4ipTWzRwlVWp7V+tzvWKpc+SxPW7 pAWOnw/fDHsJIHTBtkNQFQ4KinvzuFFwa2jTzNGRNaglYJWBphr2kZ+jRr7E+/Yn2yZa LTwQ== X-Gm-Message-State: ACgBeo2bP+3aKHwmReKQm+qaRjCm3VKVC03wLKqOMyVuEmmShGTw1Qaq NZtWHxh5U/fbCsHu9O1/XgqbtkEbrIztN//PjrcyLqt/JhrXyYLI7QZKzc+VpftxoXN2LRWkxJQ bFLP5DNY7yJDTDWU5DzY= X-Received: by 2002:a05:6402:11d1:b0:43e:33b:93fa with SMTP id j17-20020a05640211d100b0043e033b93famr20817328edw.419.1661863437710; Tue, 30 Aug 2022 05:43:57 -0700 (PDT) X-Google-Smtp-Source: AA6agR5MkLmqPvZ4zEJXpQQxZDDkk9BwigfXy6QAYoxkpHqR6bitpbH44THhnvZwxs4kVW7rbrBnag== X-Received: by 2002:a05:6402:11d1:b0:43e:33b:93fa with SMTP id j17-20020a05640211d100b0043e033b93famr20817316edw.419.1661863437551; Tue, 30 Aug 2022 05:43:57 -0700 (PDT) From: Martin Kletzander To: libvir-list@redhat.com Subject: [PATCH] conf: Add more checks for VDS interface parameters Date: Tue, 30 Aug 2022 14:43:48 +0200 Message-Id: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 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 2.84 on 10.11.54.2 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1661863452139100001 Content-Type: text/plain; charset="utf-8"; x-default="true" Add some checks that commit 0225483adce9 forgot to include. Signed-off-by: Martin Kletzander Reviewed-by: Daniel P. Berrang=C3=A9 --- src/conf/domain_conf.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 6950f7ec1d8f..970cc85ded6c 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -9336,6 +9336,27 @@ virDomainNetDefParseXML(virDomainXMLOption *xmlopt, goto error; } =20 + if (!portid) { + virReportError(VIR_ERR_XML_ERROR, + _("Missing source portid for interface type '%s= '"), + virDomainNetTypeToString(def->type)); + goto error; + } + + if (!connectionid) { + virReportError(VIR_ERR_XML_ERROR, + _("Missing source connectionid for interface ty= pe '%s'"), + virDomainNetTypeToString(def->type)); + goto error; + } + + if (!portgroup) { + virReportError(VIR_ERR_XML_ERROR, + _("Missing source portgroup for interface type = '%s'"), + virDomainNetTypeToString(def->type)); + goto error; + } + if (virUUIDParse(switchid, def->data.vds.switch_id) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, _("Unable to parse switchid '%s'"), switchid); --=20 2.37.2