Blame SOURCES/libvirt-qemu-hotplug-report-error-when-changing-rom-enabled-attr-for-net-iface.patch

51d9a2
From 4fa90611d24e5899af1f1cbf4424fd0dced25d7b Mon Sep 17 00:00:00 2001
51d9a2
Message-Id: <4fa90611d24e5899af1f1cbf4424fd0dced25d7b@dist-git>
51d9a2
From: Katerina Koukiou <kkoukiou@redhat.com>
51d9a2
Date: Mon, 16 Jul 2018 11:42:28 +0200
51d9a2
Subject: [PATCH] qemu: hotplug: report error when changing rom enabled attr
51d9a2
 for net iface
51d9a2
MIME-Version: 1.0
51d9a2
Content-Type: text/plain; charset=UTF-8
51d9a2
Content-Transfer-Encoding: 8bit
51d9a2
51d9a2
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1599513
51d9a2
51d9a2
Signed-off-by: Katerina Koukiou <kkoukiou@redhat.com>
51d9a2
Reviewed-by: Ján Tomko <jtomko@redhat.com>
51d9a2
(cherry picked from commit 611b038fb60e23eb574148192090f33bc7264be2)
51d9a2
Signed-off-by: Katerina Koukiou <kkoukiou@redhat.com>
51d9a2
Reviewed-by: Ján Tomko <jtomko@redhat.com>
51d9a2
---
51d9a2
 src/qemu/qemu_hotplug.c | 5 +++++
51d9a2
 1 file changed, 5 insertions(+)
51d9a2
51d9a2
diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c
51d9a2
index 3d0f1055d9..91a751a2fe 100644
51d9a2
--- a/src/qemu/qemu_hotplug.c
51d9a2
+++ b/src/qemu/qemu_hotplug.c
51d9a2
@@ -3222,6 +3222,11 @@ qemuDomainChangeNet(virQEMUDriverPtr driver,
51d9a2
                        _("cannot modify network device boot index setting"));
51d9a2
         goto cleanup;
51d9a2
     }
51d9a2
+    if (olddev->info.romenabled != newdev->info.romenabled) {
51d9a2
+        virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s",
51d9a2
+                       _("cannot modify network device rom enabled setting"));
51d9a2
+        goto cleanup;
51d9a2
+    }
51d9a2
     /* (end of device info checks) */
51d9a2
 
51d9a2
     if (STRNEQ_NULLABLE(olddev->filter, newdev->filter) ||
51d9a2
-- 
51d9a2
2.18.0
51d9a2