]> git.ipfire.org Git - thirdparty/libvirt.git/commit
lxc: check actual type of interface not config type
authorLaine Stump <laine@laine.org>
Wed, 5 Dec 2018 21:58:08 +0000 (16:58 -0500)
committerLaine Stump <laine@laine.org>
Sat, 8 Dec 2018 17:37:32 +0000 (12:37 -0500)
commit59603b62fa4995110c6779cdb0263d2d93204dad
tree04fa33ec4c52da81ea9cb345d79de1ffbd47cc8c
parent081bdb4d68405aa3c6aa940f27e2464b5f339d65
lxc: check actual type of interface not config type

virLXCControllerGetNICIndexes() was deciding whether or not to add the
ifindex for an interface's ifname to the list of ifindexes sent to
CreateMachineWithNetwork based on the interface type stored in the
config. This would be incorrect in the case of <interface
type='network'> where the network was giving out macvlan interfaces
tied to a physical device (i.e. when the actual interface type was
"direct").

Instead of checking the setting of "net->type", we should be checking
the setting of virDomainNetGetActualType(net).

I don't think this caused any actual misbehavior, it was just
technically wrong.

Signed-off-by: Laine Stump <laine@laine.org>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/lxc/lxc_controller.c