提交 bd622e2a 编写于 作者: J Ján Tomko

qemu: do not revert to NULL bandwidth

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: NJán Tomko <jtomko@redhat.com>
Fixes: f02e21cb
https://bugzilla.redhat.com/show_bug.cgi?id=1800505Reviewed-by: NDaniel Henrique Barboza <danielhb413@gmail.com>
上级 cebb468e
...@@ -11682,8 +11682,10 @@ qemuDomainSetInterfaceParameters(virDomainPtr dom, ...@@ -11682,8 +11682,10 @@ qemuDomainSetInterfaceParameters(virDomainPtr dom,
net->bandwidth, net->bandwidth,
false, false,
!virDomainNetTypeSharesHostView(net))); !virDomainNetTypeSharesHostView(net)));
if (net->bandwidth) {
ignore_value(virDomainNetBandwidthUpdate(net, ignore_value(virDomainNetBandwidthUpdate(net,
net->bandwidth)); net->bandwidth));
}
goto endjob; goto endjob;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册