On 09/10/2018 02:55 PM, Chen Hanxiao wrote:
At 2018-09-07 18:44:53, "Lin Ma" <lma@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@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 <-> mac
entry in arp able.

What you mentioned above remind me one thing: I forgot to mention that
if the switch doesn't support hairpin mode, then the virtual interfaces
which backend is mactap can't communicate with host, that means the host
arp table won't include the ip <-> mac information of such virtual interfaces.
In this 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 anyelse net types, the code will iterate the arp table for
loop to try to search if there is a matched entry.

what do you think?

Thanks,
Lin