[libvirt] [PATCH 1/2] qemu: Remove network type limitation for qemuARPGetInterfaces

Lin Ma lma at suse.com
Tue Sep 11 05:51:43 UTC 2018



On 09/10/2018 02:55 PM, Chen Hanxiao wrote:
> At 2018-09-07 18:44:53, "Lin Ma" <lma at suse.com> wrote:
> >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 <lma at suse.com>
> Hi,
> with my limited tests,
> we can't get useful info by arp query from other kind of interface types.

IMO, As long as the host interface and the guest interface communicated
through osi layer3 or above, Host kernel will maintaince the corresponding
ip <-> macentry in arp able.

What you mentioned above remind me one thing: I forgot to mention that
if the switch doesn't support hairpin mode, thenthe virtual interfaces
which backend is mactap can't communicate withhost, that means the host
arp table won't include the ip <-> mac information of suchvirtual 
interfaces.
Inthis case, the qemuARPGetInterfaces can't get IP.

So I'd like to change the code to only ignore VIR_DOMAIN_NET_TYPE_DIRECT
in patch V2, For anyelsenet types, the code will iterate the arp table for
loopto try to search if there is a matched entry.

what do you think?

Thanks,
Lin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20180911/8303b7d9/attachment-0001.htm>


More information about the libvir-list mailing list