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

Lin Ma lma at suse.com
Tue Sep 25 09:37:24 UTC 2018


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 at 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




More information about the libvir-list mailing list