]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemu_hotplug: Deny changing @rss and @rss_hash_report attributes of virtio vNICs
authorMichal Privoznik <mprivozn@redhat.com>
Mon, 23 May 2022 15:17:02 +0000 (17:17 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Tue, 24 May 2022 07:02:00 +0000 (09:02 +0200)
We have virDomainUpdateDeviceFlags() API that allows changing of
some attributes of a device whilst domain is still running (e.g.
setting different QoS, link state change on vNICs). But only very
limited set of attributes can be changed and we have to check
whether user isn't trying to sneak in a change that's not
allowed. Well, in case of a virtio vNIC we forgot to check for
@rss and @rss_hash_report attributes of <driver/>.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2082540
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Laine Stump <laine@redhat.com>
src/qemu/qemu_hotplug.c

index 24df66cc9fba224b23f3fd11d6832bacce55bb47..f795568299a9e90c246c607df8c9141b6307a7da 100644 (file)
@@ -3662,7 +3662,9 @@ qemuDomainChangeNet(virQEMUDriver *driver,
          olddev->driver.virtio.guest.tso4 != newdev->driver.virtio.guest.tso4 ||
          olddev->driver.virtio.guest.tso6 != newdev->driver.virtio.guest.tso6 ||
          olddev->driver.virtio.guest.ecn != newdev->driver.virtio.guest.ecn ||
-         olddev->driver.virtio.guest.ufo != newdev->driver.virtio.guest.ufo)) {
+         olddev->driver.virtio.guest.ufo != newdev->driver.virtio.guest.ufo ||
+         olddev->driver.virtio.rss != newdev->driver.virtio.rss ||
+         olddev->driver.virtio.rss_hash_report != newdev->driver.virtio.rss_hash_report)) {
         virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s",
                        _("cannot modify virtio network device driver attributes"));
         goto cleanup;