From: Laine Stump <[email protected]>

Somehow we've never checked for this, and nobody has ever tested for
it or complained about it, but certainly attempting to change a user
or vhostuser network device to/from a passt backend wouldn't work. Now
we check for it and log an error.

Signed-off-by: Laine Stump <[email protected]>
---
 src/qemu/qemu_hotplug.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c
index 9439948089..7ab28bed6d 100644
--- a/src/qemu/qemu_hotplug.c
+++ b/src/qemu/qemu_hotplug.c
@@ -3808,6 +3808,12 @@ qemuDomainChangeNet(virQEMUDriver *driver,
         goto cleanup;
     }
 
+    if (olddev->backend.type != newdev->backend.type) {
+        virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s",
+                       _("cannot change backend type of network interface"));
+        goto cleanup;
+    }
+
     /* Check individual attributes for changes that can't be done to a
      * live netdev. These checks *mostly* go in order of the
      * declarations in virDomainNetDef in order to assure nothing is
-- 
2.53.0

Reply via email to