From: Adam Julis Date: Fri, 22 Mar 2024 08:12:26 +0000 (+0100) Subject: qemuDomainChangeNet: Error when boot index changes in live XML X-Git-Tag: v10.2.0-rc1~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=68212711230f60bd430660510eb12bd3dfb751e9;p=thirdparty%2Flibvirt.git qemuDomainChangeNet: Error when boot index changes in live XML If the original code detected a missing or null boot index in the new XML, it automatically added the current value. This autocompletion was incorrect because it was impossible to distinguish between user intent and user error - changing the boot order itself is forbidden and should always be an error. Resolves: https://issues.redhat.com/browse/RHEL-23416 Fixes: aa3e07caec6179dfa6479deab14a21a493637d53 Signed-off-by: Adam Julis Reviewed-by: Michal Privoznik --- diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c index b9c502613c..62dc879ed4 100644 --- a/src/qemu/qemu_hotplug.c +++ b/src/qemu/qemu_hotplug.c @@ -3847,8 +3847,6 @@ qemuDomainChangeNet(virQEMUDriver *driver, goto cleanup; } - if (newdev->info.bootIndex == 0) - newdev->info.bootIndex = olddev->info.bootIndex; if (olddev->info.bootIndex != newdev->info.bootIndex) { virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s", _("cannot modify network device boot index setting"));