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

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

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

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
participants (3)
-
Chen Hanxiao
-
Lin Ma
-
Michal Privoznik