From nobody Thu Mar 28 22:18:39 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=1637249568; cv=none; d=zohomail.com; s=zohoarc; b=WzqDrREVk8/qHcQt4XH3Pr3CkJrCXqDvNdg2kfctyD8mNbInnBl/a1G+VBMhSajFEQ0X+ToMn9H2GjVHGUAwjwmOZG47Q6R390PNILsfD9D0awUKKT2zKl9zFqh/nZWn+dzKwuA+QIPNOgh9CD2/6yFaWrPf0piKZ+eDmkvyYSY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1637249568; 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=9cazonOAAhWWBvgnO/lXNYIjXiCgmuc2wWqQ1CeqFmU=; b=dYuiIPXcHFhpCpdmS+pZvHS6EVO+fqgrozaC2rbnpU4zOyzBKKAw79rlBcqICsY1zgoU7C/a4RYDeVOpDV9lvyM0Pxzh45VKSDyQSXLyvnwo5se7JBo4+qvtV9fCrDILkxynlbXdn4rTyErCe2s+NKnzK5+b8f44D85gYz1iQQo= 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 1637249568550512.6596555373856; Thu, 18 Nov 2021 07:32:48 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-578-RBlaMezTNROcurHfKrRDUg-1; Thu, 18 Nov 2021 10:32:44 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id C026787D541; Thu, 18 Nov 2021 15:32:38 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2AB621037F46; Thu, 18 Nov 2021 15:32:38 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 206AA180BAD1; Thu, 18 Nov 2021 15:32:37 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 1AIFWZBY022341 for ; Thu, 18 Nov 2021 10:32:35 -0500 Received: by smtp.corp.redhat.com (Postfix) id AA53C19E7E; Thu, 18 Nov 2021 15:32:35 +0000 (UTC) Received: from hjs.redhat.com (unknown [10.43.2.85]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3155060657 for ; Thu, 18 Nov 2021 15:32:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1637249567; 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=9cazonOAAhWWBvgnO/lXNYIjXiCgmuc2wWqQ1CeqFmU=; b=h1eLhliSVd3SGhM7C3l0vWfs8ZANVAJYMS1eAsolTMrDrZbtNEwuW/zC2y/rNoWEZPbwX8 Ln9qltE2l/cEAv0FdHKKsVJH5Am6SoDClfl+mgImWnJ9Z7t1eRP97nA3oXblRTAM+T51jl ILW3isPS9ff6domPdUmQ7HjQtgoZdTQ= X-MC-Unique: RBlaMezTNROcurHfKrRDUg-1 From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Subject: [libvirt PATCH] conf: match by network alias only if aliases are assigned Date: Thu, 18 Nov 2021 16:32:25 +0100 Message-Id: <2038a08115be626330b98687ba008802c59be8b5.1637249543.git.jtomko@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1637249569370100001 Commit 114e3b423210d316b3326816fd2c33335b1167fe added matching by aliases for interfaces with same MAC address. ( https://bugzilla.redhat.com/show_bug.cgi?id=3D1926190 ) However, unless the domain is using user aliases (prefixed ua-), there are no aliases in the persistent definition. Only match by MAC/PCI/other addresses in that case, to fix update-device with --persistent flag (AFFECT_LIVE | AFFECT_CONFIG). https://bugzilla.redhat.com/show_bug.cgi?id=3D2024098 Fixes: 114e3b423210d316b3326816fd2c33335b1167fe Signed-off-by: J=C3=A1n Tomko Reviewed-by: Martin Kletzander --- src/conf/domain_conf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index da0c64b460..0d7489094b 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -15763,8 +15763,8 @@ virDomainNetFindIdx(virDomainDef *def, virDomainNet= Def *net) &net->info.addr.ccw)) continue; =20 - if (net->info.alias && - STRNEQ_NULLABLE(def->nets[i]->info.alias, net->info.alias)) { + if (net->info.alias && def->nets[i]->info.alias && + STRNEQ(def->nets[i]->info.alias, net->info.alias)) { continue; } =20 --=20 2.31.1