mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 05:35:25 +00:00
qemu: passt: Use 'reconnect-ms' instead of 'reconnect' with new qemus
The 'reconnect' field of 'stream' network backend type is about to be deprecated so libvirt will need to start using 'reconnect-ms'. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
9e273db203
commit
e4d058866e
@ -104,12 +104,14 @@ qemuPasstAddNetProps(virDomainObj *vm,
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* a narrow range of QEMU releases support -netdev stream, but
|
||||
* don't support its "reconnect" option
|
||||
*/
|
||||
if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_NETDEV_STREAM_RECONNECT) &&
|
||||
virJSONValueObjectAdd(netprops, "u:reconnect", 5, NULL) < 0) {
|
||||
return -1;
|
||||
if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_NETDEV_STREAM_RECONNECT)) {
|
||||
if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_NETDEV_STREAM_RECONNECT_MILISECONDS)) {
|
||||
if (virJSONValueObjectAdd(netprops, "u:reconnect-ms", 5000, NULL) < 0)
|
||||
return -1;
|
||||
} else {
|
||||
if (virJSONValueObjectAdd(netprops, "u:reconnect", 5, NULL) < 0)
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user