From nobody Sun May 5 01:37:21 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 15378683933651020.847681303144; Tue, 25 Sep 2018 02:39:53 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id A7D2F308FBAA; Tue, 25 Sep 2018 09:39:50 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id D42545D6A9; Tue, 25 Sep 2018 09:39:49 +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 C10234BB75; Tue, 25 Sep 2018 09:39:47 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w8P9dkJA028903 for ; Tue, 25 Sep 2018 05:39:46 -0400 Received: by smtp.corp.redhat.com (Postfix) id F3FAE1073033; Tue, 25 Sep 2018 09:39:46 +0000 (UTC) Received: from mx1.redhat.com (ext-mx07.extmail.prod.ext.phx2.redhat.com [10.5.110.31]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 9F61E100195E; Tue, 25 Sep 2018 09:39:43 +0000 (UTC) Received: from mail-pg1-f178.google.com (mail-pg1-f178.google.com [209.85.215.178]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 821B2C049D53; Tue, 25 Sep 2018 09:39:42 +0000 (UTC) Received: by mail-pg1-f178.google.com with SMTP id y4-v6so11111356pgp.9; Tue, 25 Sep 2018 02:39:42 -0700 (PDT) Received: from localhost.localdomain ([45.122.156.254]) by smtp.gmail.com with ESMTPSA id d19-v6sm3695664pfe.42.2018.09.25.02.39.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 25 Sep 2018 02:39:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=TKQyI3EgoD1ee8gl5nAMFqC2B/odYVOUdcav/7oukcE=; b=a4AQ/aKCGGWXzB47/6/O/2HPULZUge7zqzeNpbSonOcAG+dOMf3g910/H4nL2V/+G0 HDW16xEBP65+GEhpYDy29xI5cZAPJlrjKJOez9Ld1mBXjhOJ4ZXftbKBFQmLPVukpH3V vAuErJBqWGU/kXRa+v9VkpW2xqw9YyF2vE5ToIpD8Oc0HJcULgBBtgQ4uqXqcYIYkYbX uA7Z0JnrJaK0aLrtt5nIdAQ5YDxzLSR6IVQAF8+i3gphwPSXEN/YlPJ2GriFla0okdcB T89rQ3133CxY2KNIWHOPN1cy2P5inhrQMmuzw0bM57WuBLpmNOc/VFgv2AK0rN1TrMeS 4XWQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :mime-version:content-transfer-encoding; bh=TKQyI3EgoD1ee8gl5nAMFqC2B/odYVOUdcav/7oukcE=; b=PmB4hfPy4VaoR0T/ayP3ePyBSXf6vETnNbRAbw1frw3LLffzF+z7vQErI4b337CNHp uojhVTDfUut7pSpz1mIHFTUdFhHzpnLlbTz6cxLInAusTot+pjl7v6cJKo+n/b68/UN+ Zebx27hRRwkAUoj17kfAd40rT+zcxjfwQVs9ruzrED2i/mh9YrJa+5uPfC1MywfnIkHM NzI+2H1eUTP3iTcvKlVKqoX9cv6DMEsDr24pDdtS6QflIRe9sdDJv10o5CmE4ZrzWrBa hTZq96CVaJu2FGx0/rU+0d+wEmSZd0xO+SpJ7AcHrIAGK53hd4fFmun3RzSelQx2hq0B cQmA== X-Gm-Message-State: ABuFfojmjeiyNudLTFT7vPOhZQk1RhyS8rQOj9KiRvkP/CbE46APHFmY gvOUrr8ZQHyEW4uMAWfZZPCvZjzr X-Google-Smtp-Source: ACcGV634Q5KwNustLT+goPcWdKfsO0jtj/6NjOnq97IG6r7ICmp/LxZvrPgcItDaoKz1TJveifSIow== X-Received: by 2002:a63:6946:: with SMTP id e67-v6mr206165pgc.119.1537868381707; Tue, 25 Sep 2018 02:39:41 -0700 (PDT) From: Lin Ma To: libvir-list@redhat.com Date: Tue, 25 Sep 2018 17:37:24 +0800 Message-Id: <20180925093724.9975-1-lma@suse.com> MIME-Version: 1.0 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Tue, 25 Sep 2018 09:39:42 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Tue, 25 Sep 2018 09:39:42 +0000 (UTC) for IP:'209.85.215.178' DOMAIN:'mail-pg1-f178.google.com' HELO:'mail-pg1-f178.google.com' FROM:'morecache@gmail.com' RCPT:'' X-RedHat-Spam-Score: 0.49 (DKIM_SIGNED, DKIM_VALID, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE, SPF_PASS) 209.85.215.178 mail-pg1-f178.google.com 209.85.215.178 mail-pg1-f178.google.com X-Scanned-By: MIMEDefang 2.78 on 10.5.110.31 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com Cc: Lin Ma , chenhanxiao@gmail.com, laine@laine.org Subject: [libvirt] [PATCH v3] qemu: Remove network type limitation for qemuARPGetInterfaces 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: , Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.43]); Tue, 25 Sep 2018 09:39:51 +0000 (UTC) X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Let's ignore the checking of interface type when we call the function qemuARPGetInterfaces to get IP from host's arp table. Based on suggestion from Laine. https://www.redhat.com/archives/libvir-list/2018-September/msg00684.html Signed-off-by: Lin Ma Reviewed-by: Chen Hanxiao --- src/qemu/qemu_driver.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 10d6bca186..3110e74e0e 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -20945,9 +20945,6 @@ qemuARPGetInterfaces(virDomainObjPtr vm, goto cleanup; =20 for (i =3D 0; i < vm->def->nnets; i++) { - if (vm->def->nets[i]->type !=3D VIR_DOMAIN_NET_TYPE_NETWORK) - continue; - virMacAddrFormat(&(vm->def->nets[i]->mac), macaddr); for (j =3D 0; j < table->n; j++) { virArpTableEntry entry =3D table->t[j]; --=20 2.19.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list