On 09/13/2018 03:54 AM, Lin Ma wrote:
When we call qemuARPGetInterfaces to get IP from the host's arp
table, We
ignore VIR_DOMAIN_NET_TYPE_ETHERNET, VIR_DOMAIN_NET_TYPE_VHOSTUSER and
s/ignore/should ignore/
VIR_DOMAIN_NET_TYPE_DIRECT due to the host's arp table won't
include the
ip <-> mac entries about these type of backends.
Signed-off-by: Lin Ma <lma(a)suse.com>
---
src/qemu/qemu_driver.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
OK - so not my area of expertise - I'm CC'g laine to get his opinion
just in case he missed this... I always get overly cautious since there
are many network types and this seems to be a rather far reaching change
of fetch...
You should reference commit e24d4c905 which added this code as it would
help focus on when the change was made.
Also since this really are disjoint problems, you should have created
separate patches especially since none of Sukrit's changes have anything
to do with this, but he's CC'd on the series because his change for
patch 2/2 did break something...
John
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 2f8d6915e1..f066e02f36 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -20940,7 +20940,9 @@ qemuARPGetInterfaces(virDomainObjPtr vm,
goto cleanup;
for (i = 0; i < vm->def->nnets; i++) {
- if (vm->def->nets[i]->type != VIR_DOMAIN_NET_TYPE_NETWORK)
+ if (vm->def->nets[i]->type == VIR_DOMAIN_NET_TYPE_ETHERNET ||
+ vm->def->nets[i]->type == VIR_DOMAIN_NET_TYPE_VHOSTUSER ||
+ vm->def->nets[i]->type == VIR_DOMAIN_NET_TYPE_DIRECT)
continue;
virMacAddrFormat(&(vm->def->nets[i]->mac), macaddr);