virnetdevtap: Don't crash on !ifname in virNetDevTapInterfaceStats
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: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NAndrea Bolognani <abologna@redhat.com>
Showing
想要评论请 注册 或 登录