]> git.ipfire.org Git - thirdparty/libvirt.git/commit
network: Convert managed property of hostdev-pci ports correctly
authorAndrea Bolognani <abologna@redhat.com>
Thu, 24 Mar 2022 18:32:13 +0000 (19:32 +0100)
committerAndrea Bolognani <abologna@redhat.com>
Tue, 5 Apr 2022 11:40:35 +0000 (13:40 +0200)
commit167ac6354ce9bd306c682f4507f5c92c9709521f
tree4bafe2a8edf17798eb2286102b4e64e8af5265fc
parent06f5c092b8a38a9d88c7ef01ee37891ad45cbdc8
network: Convert managed property of hostdev-pci ports correctly

virNetworkForwardDef.managed is a bool but
virNetworkPortDef.hostdevpci.managed is a virTristateBool, which
means that the current code performs the following incorrect
conversion:

  false -> BOOL_ABSENT
  true  -> BOOL_YES

Using the virTristateBoolFromBool() helper solves the issue.

Fixes: 6cb0ec48bd95c95489a987e05a88e8bcf1f9109c
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
src/network/bridge_driver.c