]> git.ipfire.org Git - thirdparty/libvirt.git/commit
virNetDevOpenvswitchGetVhostuserIfname: Actually use @path to lookup interface
authorMichal Privoznik <mprivozn@redhat.com>
Wed, 16 Dec 2020 17:52:48 +0000 (18:52 +0100)
committerMichal Privoznik <mprivozn@redhat.com>
Thu, 17 Dec 2020 08:25:36 +0000 (09:25 +0100)
commit0dd029b7f2e7d9619ca6a22f43857aafb449c3a7
tree1c0fee9869bda925f946d1f0a686a29d8bb7150c
parent4252318bb3e863df52c90cbf9b3c70de11fa1a53
virNetDevOpenvswitchGetVhostuserIfname: Actually use @path to lookup interface

In v6.10.0-rc1~221 I wanted to make virNetDevOpenvswitchGetVhostuserIfname()
lookup interface name even for vhostuser interfaces with mode='server'. For
these, we are given a socket path which is then created by QEMU and to which
OpenVSwitch connects to and creates an interface. Because of this, we don't
know the name of the interface upfront (when starting QEMU) and have to use
the path to query OpenVSwitch later (using ovs-vsctl). What I intended to use
was:

  ovs-vsctl --no-headings --columns=name find Interface options:vhost-server-path=$path

But what my code does is:

  ovs-vsctl --no-headings --columns=name find Interface options:vhost-server-path=path

and it's all because the argument to the function is named "path"
which I then enclosed in double quotes while it should have been
used as a variable.

Fixes: e4c29e2904197472919d050c67acfd59f0144bbc
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1767013
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Laine Stump <laine@redhat.com>
src/util/virnetdevopenvswitch.c