]> git.ipfire.org Git - thirdparty/libvirt.git/commit
lxc: support <interface type='ethernet'>
authorLaine Stump <laine@laine.org>
Fri, 13 May 2016 17:20:54 +0000 (13:20 -0400)
committerLaine Stump <laine@laine.org>
Tue, 24 May 2016 19:21:05 +0000 (15:21 -0400)
commit002b7704ff757f4bb30741b6fa78a469f6e543d0
tree218d08e90d2007139836414c1da9b1b82d9da285
parent306b3a85041642ab29db37d736789de296ae147c
lxc: support <interface type='ethernet'>

This is identical to type='bridge', but without the "connect to a
bridge" part, so it can be handled by using the same functions (and
often even the same cases in switch statements), after renaming
virLXCProcessSetupInterfaceBridged() to virLXCProcessInterfaceTap()
and enhancing it to skip bridge-related items when brname == NULL.

To be truly useful, we need to support setting the ip address on the
host side veth as well as guest side veth (already supported for
type='bridge'), as well as setting the peer address for both.

The <script> element (supported by type='ethernet' in qemu) isn't
supported in this patch. An error is logged at domain start time if it
is encountered. This may be changed in a later patch.
src/lxc/lxc_controller.c
src/lxc/lxc_driver.c
src/lxc/lxc_native.c
src/lxc/lxc_process.c
src/lxc/lxc_process.h
tests/lxcconf2xmldata/lxcconf2xml-ethernet.config [new file with mode: 0644]
tests/lxcconf2xmldata/lxcconf2xml-ethernet.xml [new file with mode: 0644]
tests/lxcconf2xmltest.c
tests/lxcxml2xmldata/lxc-ethernet.xml [new file with mode: 0644]
tests/lxcxml2xmltest.c