From: Michal Privoznik Date: Thu, 8 Jun 2017 08:14:36 +0000 (+0200) Subject: qemu: Set iface MTU on hotplug X-Git-Tag: v3.5.0-rc1~111 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f00e6f8bc9081f158b7d6a1dcfa82218b1dbfb4d;p=thirdparty%2Flibvirt.git qemu: Set iface MTU on hotplug https://bugzilla.redhat.com/show_bug.cgi?id=1408701 While implementing MTU (572eda12ad and friends), I've forgotten to actually set MTU on the host NIC in case of hotplug. We correctly tell qemu on the monitor what the MTU should be, but we are not actually setting it on the host NIC. Signed-off-by: Michal Privoznik Reviewed-by: Laine Stump --- diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c index 6701bd9bc8..8066acae33 100644 --- a/src/qemu/qemu_hotplug.c +++ b/src/qemu/qemu_hotplug.c @@ -1134,6 +1134,10 @@ qemuDomainAttachNetDevice(virQEMUDriverPtr driver, } } + if (net->mtu && + virNetDevSetMTU(net->ifname, net->mtu) < 0) + goto cleanup; + for (i = 0; i < tapfdSize; i++) { if (qemuSecuritySetTapFDLabel(driver->securityManager, vm->def, tapfd[i]) < 0)