From nobody Mon May 6 14:30:44 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 1536317246096777.1754047636721; Fri, 7 Sep 2018 03:47:26 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 8003F811BF; Fri, 7 Sep 2018 10:47:24 +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 4E89619C93; Fri, 7 Sep 2018 10:47:24 +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 F0BCD4A465; Fri, 7 Sep 2018 10:47:23 +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 w87AlINV005914 for ; Fri, 7 Sep 2018 06:47:18 -0400 Received: by smtp.corp.redhat.com (Postfix) id 16158106425A; Fri, 7 Sep 2018 10:47:18 +0000 (UTC) Received: from mx1.redhat.com (ext-mx11.extmail.prod.ext.phx2.redhat.com [10.5.110.40]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 10135103BAB3 for ; Fri, 7 Sep 2018 10:47:15 +0000 (UTC) Received: from mail-pg1-f173.google.com (mail-pg1-f173.google.com [209.85.215.173]) (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 740BA308427E for ; Fri, 7 Sep 2018 10:47:14 +0000 (UTC) Received: by mail-pg1-f173.google.com with SMTP id r1-v6so6805929pgp.11 for ; Fri, 07 Sep 2018 03:47:14 -0700 (PDT) Received: from localhost.localdomain ([45.122.156.254]) by smtp.gmail.com with ESMTPSA id l79-v6sm13870980pfi.172.2018.09.07.03.47.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 07 Sep 2018 03:47:12 -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:in-reply-to:references; bh=QzyrFMjyR5sCXxYr70CbZ6C1twwpOX/HDIpvHlMTbas=; b=JHCY8XKXcvKSHNG2gMJEF+XevaEIj98d1UZ/KGTqgpW4tzyxnh2g35u3rxZT1ch1s0 iM3E8Uwfskxj/ulDzhXr6z83QWDIuDj53toLJyu2tgBmbheopyWaOJb6iLJiKvmcKuqN eYPjujvfCNpmks13/17E0oL++rnAusw4tDdWO6V0pVEFc3mgSC5G5tlokfkPJfwMP1cs ywNICp0CdUjZ54V4n36pVaiRyLOP7qObPsxIl3px3QuyruqfixBv5r2B/EDIxje/nzqP +38MfkcjBAy8kofJGqNZ6dsgd/ZKOUkQ8N+sb22sH5f55QUA3J56oNclCaEQmoU/r7sW HHcA== 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 :in-reply-to:references; bh=QzyrFMjyR5sCXxYr70CbZ6C1twwpOX/HDIpvHlMTbas=; b=uKZP1xLes9huDdb9zbpEb4+amS1zAMSfyJMAiZNGTLffgrPYQE3mpRfPAZ4sU56LS8 IReICeH+MkaC76FTj4ox5uYm7m1N1iGIkduNzzCRFJuajqDDg/ZnmOU2rdrekDuhuFNf O3BEXZAgWqngjkGVLT0WlfNTEajDXYR9/HJ3aQ+JGq0flOZDPmhukMyvNl/oEzK0x+iE 1nY+93vym7S3aMHlhXGq8X0E3FNJVE3yDWU4R76L23RT/rAZV5aT2XAHq+cF/6iLpgln 7xKsH+j8ZJoNEKfS2BHYJeI1FOHA2qc8Bsl4h9XGyvtYTJMY9gbISJjPM/gTdiKwBwfo CTZQ== X-Gm-Message-State: APzg51DbzzTq6UQDkYJWs2WRpLzxkbP93+psov6oQzSyPMi6moGiP1vU Nh0sjUNguF8j6EQpRqbpe1A6ehu0 X-Google-Smtp-Source: ANB0VdYp/qcUhrrwW3jNyeQsKFGI2nfumnFAyv4pfF7P8IM8/y9AFvwoXNu9gAtkHQ+rZ3aanHuQog== X-Received: by 2002:a63:f751:: with SMTP id f17-v6mr7611690pgk.410.1536317233693; Fri, 07 Sep 2018 03:47:13 -0700 (PDT) From: Lin Ma To: libvir-list@redhat.com Date: Fri, 7 Sep 2018 18:44:53 +0800 Message-Id: <20180907104454.7716-2-lma@suse.com> In-Reply-To: <20180907104454.7716-1-lma@suse.com> References: <20180907104454.7716-1-lma@suse.com> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.40]); Fri, 07 Sep 2018 10:47:14 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.40]); Fri, 07 Sep 2018 10:47:14 +0000 (UTC) for IP:'209.85.215.173' DOMAIN:'mail-pg1-f173.google.com' HELO:'mail-pg1-f173.google.com' FROM:'morecache@gmail.com' RCPT:'' X-RedHat-Spam-Score: 0.303 (DKIM_SIGNED, DKIM_VALID, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE, SPF_PASS) 209.85.215.173 mail-pg1-f173.google.com 209.85.215.173 mail-pg1-f173.google.com X-Scanned-By: MIMEDefang 2.84 on 10.5.110.40 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com Cc: skrtbhtngr@gmail.com, chenhanxiao@gmail.com, Lin Ma Subject: [libvirt] [PATCH 1/2] 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: , MIME-Version: 1.0 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.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Fri, 07 Sep 2018 10:47:25 +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" When we call qemuARPGetInterfaces to get IP from host's arp table, The iface's type has nothing to do with it, We should allow all of type. Signed-off-by: Lin Ma --- 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 2f8d6915e1..c2abecf81d 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -20940,9 +20940,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.16.2 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Mon May 6 14:30:44 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 15363172438461020.1411369640615; Fri, 7 Sep 2018 03:47:23 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 7F7968553D; Fri, 7 Sep 2018 10:47:22 +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 A352B5C6C1; Fri, 7 Sep 2018 10:47:21 +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 495084BB75; Fri, 7 Sep 2018 10:47:21 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w87AlK3g006077 for ; Fri, 7 Sep 2018 06:47:20 -0400 Received: by smtp.corp.redhat.com (Postfix) id 93E415884D; Fri, 7 Sep 2018 10:47:20 +0000 (UTC) Received: from mx1.redhat.com (ext-mx16.extmail.prod.ext.phx2.redhat.com [10.5.110.45]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 857745C880 for ; Fri, 7 Sep 2018 10:47:18 +0000 (UTC) Received: from mail-pf1-f193.google.com (mail-pf1-f193.google.com [209.85.210.193]) (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 555FB30001EF for ; Fri, 7 Sep 2018 10:47:17 +0000 (UTC) Received: by mail-pf1-f193.google.com with SMTP id x17-v6so6857835pfh.5 for ; Fri, 07 Sep 2018 03:47:17 -0700 (PDT) Received: from localhost.localdomain ([45.122.156.254]) by smtp.gmail.com with ESMTPSA id l79-v6sm13870980pfi.172.2018.09.07.03.47.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 07 Sep 2018 03:47:15 -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:in-reply-to:references; bh=ppG88EXOyDur8jyiiQQDkXy/hRDkFXka5cdaAAdwWYw=; b=ltMyFR3kwrxRlmd2BRSiVfdGzD2ktyuSD+wKEWfS6EfTFALJpTNTsPCn6/EfCt5AmZ Sk2+UHPsccWE8PWwx9WlhQtT8r4pEvabaYiIflB5ne1pi90ckDQ2lHFExvf+hgXMX7yf pteBZ/lPuKA8wXwmJ96I+Yf9EJKr+ZcP2vYdxl4xjhoKNv042yHhmCfhtUriCdBpdwCj xpfLIjEhNqarkOzjMcKudIN0CUIx3qNVTcd+6UjUHcty+V0nnc21vBfZLkdx7xlIwZSF m3VmzwKrm+y2dgKWzTadWG0TFV10YSj0Qmta/Cq3HES2KlZCQBdCRld3zTpmpy1eMtm9 8luQ== 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 :in-reply-to:references; bh=ppG88EXOyDur8jyiiQQDkXy/hRDkFXka5cdaAAdwWYw=; b=rzIWatG08Ac65erF8oiAzQs27ugSAfhsSFNkOJ4yuPskLK12BizghPS6qAUW6jOsge QJ8ur1HBMTDVpijOLByxFVggqhr1DiGScDK1knzgu69pkVjenEMWDoMnjNHwhbfV6kuB Jmprz839vPvImeVmBeNqOLNaWaOfUxcIiRmSD5co0y5UJLw2F5TT7g4jarUh1e/lVDkD +xXqrmMbFcYywVZFnp7uayDZNBaLRyLbAUGtdO6iiHf5wiPzEgXBz/pnu0/VjpJAaK3c /rA270g9z/v8GD9dFz5QLgu/68BzVQ0OpnaKPj766GQ/LoxDxKKDcSL7EpjOVOmXpCzy a0tw== X-Gm-Message-State: APzg51D3zkh3nie+7QemmjCuyehvJhoONlwOhGxPsrZAe+GiHVMUxCBX rtKhjHoLKbs4mY795OjeIUlgAk1k X-Google-Smtp-Source: ANB0VdYMiqAico+E+xLVozoZCyYlQeEt+pEvTToYQu68JmbxfBfA04jUvgJaz6N2ET4VpEi/it0d0A== X-Received: by 2002:a63:d150:: with SMTP id c16-v6mr7636260pgj.188.1536317236553; Fri, 07 Sep 2018 03:47:16 -0700 (PDT) From: Lin Ma To: libvir-list@redhat.com Date: Fri, 7 Sep 2018 18:44:54 +0800 Message-Id: <20180907104454.7716-3-lma@suse.com> In-Reply-To: <20180907104454.7716-1-lma@suse.com> References: <20180907104454.7716-1-lma@suse.com> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.45]); Fri, 07 Sep 2018 10:47:17 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.45]); Fri, 07 Sep 2018 10:47:17 +0000 (UTC) for IP:'209.85.210.193' DOMAIN:'mail-pf1-f193.google.com' HELO:'mail-pf1-f193.google.com' FROM:'morecache@gmail.com' RCPT:'' X-RedHat-Spam-Score: 0.305 (DKIM_SIGNED, DKIM_VALID, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_PASS) 209.85.210.193 mail-pf1-f193.google.com 209.85.210.193 mail-pf1-f193.google.com X-Scanned-By: MIMEDefang 2.84 on 10.5.110.45 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: libvir-list@redhat.com Cc: skrtbhtngr@gmail.com, chenhanxiao@gmail.com, Lin Ma Subject: [libvirt] [PATCH 2/2] virarptable: Return a virArpTablePtr when the nlmsghdr for loop is over 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: , MIME-Version: 1.0 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.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Fri, 07 Sep 2018 10:47:23 +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" commit b00c9c39 removed the label end_of_netlink_messages and 'return table' statement, It causes the function virArpTableGet doesn't return a proper virArpTable pointer. How to reproduce: # virsh domiflist sles12sp3 Interface Type Source Model MAC Reviewed-by: Chen Hanxiao ------------------------------------------------------- vnet0 network default virtio 52:54:00:cd:02:e6 # virsh domifaddr sles12sp3 --source arp error: Failed to query for interfaces addresses error: An error occurred, but the cause is unknown It seems that the "if (nh->nlmsg_type =3D=3D NLMSG_DONE)" statement won't be meted. So this patch adds 'return table' when the iterations of nlmsghdr for loop is over. Signed-off-by: Lin Ma --- src/util/virarptable.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/util/virarptable.c b/src/util/virarptable.c index 04a6f35571..217a960d5a 100644 --- a/src/util/virarptable.c +++ b/src/util/virarptable.c @@ -152,6 +152,8 @@ virArpTableGet(void) } } =20 + return table; + cleanup: virArpTableFree(table); return NULL; --=20 2.16.2 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list