]> xenbits.xensource.com Git - libvirt.git/commit
lxc: don't forbid <interface type='direct'>
authorLaine Stump <laine@laine.org>
Thu, 6 Dec 2018 14:59:59 +0000 (09:59 -0500)
committerLaine Stump <laine@laine.org>
Sat, 8 Dec 2018 17:38:15 +0000 (12:38 -0500)
commitc55ff370f8306718d5fa8515b907fd87b456dc12
tree9b1983a623aac9b5b80bfe9ece5acceb2f026601
parent59603b62fa4995110c6779cdb0263d2d93204dad
lxc: don't forbid <interface type='direct'>

Commit 017dfa27d changed a few switch statements in the LXC code to
have all possible enum values, and in the process changed the switch
statement in virLXCControllerGetNICIndexes() to return an error status
for unsupported interface types, but it erroneously put type='direct'
on the list of unsupported types.

type='direct' (implemented with a macvlan interface) is supported on
LXC, but it's interface shouldn't be placed on the list of interfaces
given to CreateMachineWithNetwork() because the interface is put
inside the container, while CreateMachineWithNetwork() only wants to
know about the parent veths of veth pairs (the parent veth remains on
the host side, while the child veth is put into the container).

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