diff --git a/src/libxl/libxl_driver.c b/src/libxl/libxl_driver.c index 08b0f03177..2230343b03 100644 --- a/src/libxl/libxl_driver.c +++ b/src/libxl/libxl_driver.c @@ -4982,7 +4982,7 @@ libxlDomainInterfaceStats(virDomainPtr dom, if (!(net = virDomainNetFind(vm->def, device))) goto endjob; - if (virNetDevTapInterfaceStats(device, stats, + if (virNetDevTapInterfaceStats(net->ifname, stats, !virDomainNetTypeSharesHostView(net)) < 0) goto endjob; diff --git a/src/lxc/lxc_driver.c b/src/lxc/lxc_driver.c index 6cf4993679..b3f6f064f3 100644 --- a/src/lxc/lxc_driver.c +++ b/src/lxc/lxc_driver.c @@ -2875,7 +2875,7 @@ lxcDomainInterfaceStats(virDomainPtr dom, if (!(net = virDomainNetFind(vm->def, device))) goto endjob; - if (virNetDevTapInterfaceStats(device, stats, + if (virNetDevTapInterfaceStats(net->ifname, stats, !virDomainNetTypeSharesHostView(net)) < 0) goto endjob; diff --git a/src/openvz/openvz_driver.c b/src/openvz/openvz_driver.c index ffd64da04b..9bd73d85c4 100644 --- a/src/openvz/openvz_driver.c +++ b/src/openvz/openvz_driver.c @@ -2009,7 +2009,7 @@ openvzDomainInterfaceStats(virDomainPtr dom, if (!(net = virDomainNetFind(vm->def, device))) goto cleanup; - if (virNetDevTapInterfaceStats(device, stats, + if (virNetDevTapInterfaceStats(net->ifname, stats, !virDomainNetTypeSharesHostView(net)) < 0) goto cleanup; diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 7b79c09505..260184ce87 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -11044,10 +11044,10 @@ qemuDomainInterfaceStats(virDomainPtr dom, goto cleanup; if (virDomainNetGetActualType(net) == VIR_DOMAIN_NET_TYPE_VHOSTUSER) { - if (virNetDevOpenvswitchInterfaceStats(device, stats) < 0) + if (virNetDevOpenvswitchInterfaceStats(net->ifname, stats) < 0) goto cleanup; } else { - if (virNetDevTapInterfaceStats(device, stats, + if (virNetDevTapInterfaceStats(net->ifname, stats, !virDomainNetTypeSharesHostView(net)) < 0) goto cleanup; }