Re: [libvirt PATCH 1/2] qemu: do not revert to NULL bandwidth

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On 2/7/20 8:54 AM, Ján Tomko wrote:
Otherwise an attempt to set an invalid value:
   virsh domiftune rhel8.2 vnet0 --outbound 4294968
on an interface with no bandwidth set crashes.

Signed-off-by: Ján Tomko <jtomko@xxxxxxxxxx>
Fixes: f02e21cb3379a41cd42f2d8116f2d10dabace83b
https://bugzilla.redhat.com/show_bug.cgi?id=1800505
---

Reviewed-by: Daniel Henrique Barboza <danielhb413@xxxxxxxxx>

  src/qemu/qemu_driver.c | 6 ++++--
  1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 502f4ce342..0324c771a5 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -11665,8 +11665,10 @@ qemuDomainSetInterfaceParameters(virDomainPtr dom,
                                                 net->bandwidth,
                                                 false,
                                                 !virDomainNetTypeSharesHostView(net)));
-            ignore_value(virDomainNetBandwidthUpdate(net,
-                                                     net->bandwidth));
+            if (net->bandwidth) {
+                ignore_value(virDomainNetBandwidthUpdate(net,
+                                                         net->bandwidth));
+            }
              goto endjob;
          }






[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux