[libvirt] [PATCH v3] qemu: Remove network type limitation for qemuARPGetInterfaces

Lin Ma posted 1 patch 5 years, 7 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/20180925093724.9975-1-lma@suse.com
src/qemu/qemu_driver.c | 3 ---
1 file changed, 3 deletions(-)
[libvirt] [PATCH v3] qemu: Remove network type limitation for qemuARPGetInterfaces
Posted by Lin Ma 5 years, 7 months ago
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 <lma@suse.com>
---
 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;
 
     for (i = 0; i < vm->def->nnets; i++) {
-        if (vm->def->nets[i]->type != VIR_DOMAIN_NET_TYPE_NETWORK)
-            continue;
-
         virMacAddrFormat(&(vm->def->nets[i]->mac), macaddr);
         for (j = 0; j < table->n; j++) {
             virArpTableEntry entry = table->t[j];
-- 
2.19.0

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH v3] qemu: Remove network type limitation for qemuARPGetInterfaces
Posted by Chen Hanxiao 5 years, 7 months ago
At 2018-09-25 17:37:24, "Lin Ma" <lma@suse.com> wrote:
>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 <lma@suse.com>
>---
> 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;
> 
>     for (i = 0; i < vm->def->nnets; i++) {
>-        if (vm->def->nets[i]->type != VIR_DOMAIN_NET_TYPE_NETWORK)
>-            continue;
>-
>         virMacAddrFormat(&(vm->def->nets[i]->mac), macaddr);
>         for (j = 0; j < table->n; j++) {
>             virArpTableEntry entry = table->t[j];
>-- 
>2.19.0

Reviewed-by: Chen Hanxiao <chenhanxiao@gmail.com>

Regards,
- Chen

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH v3] qemu: Remove network type limitation for qemuARPGetInterfaces
Posted by Michal Privoznik 5 years, 7 months ago
On 09/25/2018 11:37 AM, Lin Ma wrote:
> 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 <lma@suse.com>
> ---
>  src/qemu/qemu_driver.c | 3 ---
>  1 file changed, 3 deletions(-)

ACKed and pushed.

Michal

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list