[libvirt] [PATCH v2] virnetdevtap: Don't crash on !ifname in virNetDevTapInterfaceStats

Andrea Bolognani abologna at redhat.com
Fri Jul 13 13:30:29 UTC 2018


On Fri, 2018-07-13 at 13:59 +0200, Michal Privoznik wrote:
> https://bugzilla.redhat.com/show_bug.cgi?id=1595184
> 
> Some domain <interfaces/> do not have a name (because they are
> not TAP devices). Therefore, if
> virNetDevTapInterfaceStats(net->ifname, ...) is called an instant
> crash occurs. In Linux version of the function strlen() is called
> over the name and in BSD version STREQ() is called.
> 
> Signed-off-by: Michal Privoznik <mprivozn at redhat.com>
> ---
> 
> diff to v1:
> - changed the error message
> - fixed check in BSD version
> 
>  src/util/virnetdevtap.c | 12 ++++++++++++

Reviewed-by: Andrea Bolognani <abologna at redhat.com>

-- 
Andrea Bolognani / Red Hat / Virtualization




More information about the libvir-list mailing list