On a Friday in 2022, Peter Krempa wrote:
We need to use the 'name' variable and just overwrite it with
the FD
number when FDs are passed on the monitor. Otherwise we will read NULL
path if the FD is accessed before being passed on the monitor. The idea
of this helper is to simplify the monitor code so it would be
counterproductive to have other behaviour.
Fixes the following symptom:
$ virsh attach-interface cd network default --model virtio
error: Failed to attach interface
error: internal error: unable to execute QEMU command 'netdev_add': File
descriptor named '(null)' has not been found
Fixes: bca9047906fd73fd30f275dd45b64998fbbcf6de
Resolves:
https://gitlab.com/libvirt/libvirt/-/issues/318
Resolves:
https://bugzilla.redhat.com/show_bug.cgi?id=2092856
Signed-off-by: Peter Krempa <pkrempa(a)redhat.com>
---
src/qemu/qemu_fd.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
Reviewed-by: Ján Tomko <jtomko(a)redhat.com>
Jano