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

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