From: Vasiliy Tolstov <v.tolstov@xxxxxxxxx> The call to virNetDevIPInfoAddToDev() that sets up tap device IP addresses and routes was somehow incorrectly placed in qemuInterfaceStopDevice() instead of qemuInterfaceStartDevice(). This fixes that error by moving the call to virNetDevIPInfoAddToDev() to qemuInterfaceStartDevice(). Signed-off-by: Vasiliy Tolstov <v.tolstov@xxxxxxxxx> --- src/qemu/qemu_interface.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/qemu/qemu_interface.c b/src/qemu/qemu_interface.c index e637d21..e327133 100644 --- a/src/qemu/qemu_interface.c +++ b/src/qemu/qemu_interface.c @@ -108,8 +108,13 @@ qemuInterfaceStartDevice(virDomainNetDefPtr net) break; } - case VIR_DOMAIN_NET_TYPE_USER: case VIR_DOMAIN_NET_TYPE_ETHERNET: + if (virNetDevIPInfoAddToDev(net->ifname, &net->hostIP) < 0) + goto cleanup; + + break; + + case VIR_DOMAIN_NET_TYPE_USER: case VIR_DOMAIN_NET_TYPE_VHOSTUSER: case VIR_DOMAIN_NET_TYPE_SERVER: case VIR_DOMAIN_NET_TYPE_CLIENT: @@ -197,10 +202,6 @@ qemuInterfaceStopDevice(virDomainNetDefPtr net) } case VIR_DOMAIN_NET_TYPE_ETHERNET: - if (virNetDevIPInfoAddToDev(net->ifname, &net->hostIP) < 0) - goto cleanup; - break; - case VIR_DOMAIN_NET_TYPE_USER: case VIR_DOMAIN_NET_TYPE_VHOSTUSER: case VIR_DOMAIN_NET_TYPE_SERVER: -- 2.7.4 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list