]> xenbits.xensource.com Git - libvirt.git/commitdiff
virDomainNetDefCheckABIStability: Check for MTU change too
authorMichal Privoznik <mprivozn@redhat.com>
Thu, 30 Aug 2018 12:11:36 +0000 (14:11 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Tue, 4 Sep 2018 08:10:56 +0000 (10:10 +0200)
https://bugzilla.redhat.com/show_bug.cgi?id=1623157

Changing MTU on a running guest is not possible and trying to do
so made us face many problems. That's why we forbid it in
5f44d7e357f61f7. However, there is still one possible path where
users can sneak in change: migration XML.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
src/conf/domain_conf.c

index 603a4ad6524549d8da32b964026fd3e4d8a17a83..c3406cfbe6359206e52379fe97f194bb2ffadf98 100644 (file)
@@ -21901,6 +21901,13 @@ virDomainNetDefCheckABIStability(virDomainNetDefPtr src,
         return false;
     }
 
+    if (src->mtu != dst->mtu) {
+        virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
+                       _("Target network card MTU %d does not match source %d"),
+                       dst->mtu, src->mtu);
+        return false;
+    }
+
     if (src->virtio && dst->virtio &&
         !virDomainVirtioOptionsCheckABIStability(src->virtio, dst->virtio))
         return false;