]> xenbits.xensource.com Git - libvirt.git/commit
qemu: forbid setting guest-side IP address/route info of <interface>
authorLaine Stump <laine@laine.org>
Tue, 21 Jun 2016 15:59:37 +0000 (11:59 -0400)
committerLaine Stump <laine@laine.org>
Sun, 26 Jun 2016 23:33:09 +0000 (19:33 -0400)
commitd987f63a450bc5721c91bfd526ec03ccc4a6b640
tree6d003befbc0c551f0da991ea2ab3932874654657
parentfbc1843d2ec58d0383597ab33e5103a965431f45
qemu: forbid setting guest-side IP address/route info of <interface>

libvirt's qemu driver doesn't have direct access to the config on the
guest side of a network interface, and currently doesn't have any
method in place to even inform the guest of the desired config. In the
future, an unenforceable attempt to set the guest-side IP info could
be made by adding a static host entry to the appropriate dnsmasq
configuration (or changing the default dhcp client address on the qemu
commandline for type='user' interfaces), or enhancing the guest agent
to allow setting an IP address, but for now it can't have any effect,
and we don't want to give the illusion that it does.

To prevent the "disappearance" of any existing configs with ip
address/route info (due to parser failure), this check is added in the
newly implemented qemuDomainDeviceDefValidate(), which is only called
when a domain is defined or started, *not* when it is reread from disk
at libvirtd startup.
src/qemu/qemu_domain.c