]> xenbits.xensource.com Git - libvirt.git/commit
network: prevent a few invalid configuration combinations
authorLaine Stump <laine@laine.org>
Wed, 5 Dec 2012 19:10:24 +0000 (14:10 -0500)
committerLaine Stump <laine@laine.org>
Wed, 5 Dec 2012 23:03:34 +0000 (18:03 -0500)
commitfd54f1de536ebd5f7566285b83029e6c73725d03
treea7bed29554c20d8445d5c1ec246a327217c5e32b
parent705e67d40b09a905cd6a4b8b418d5cb94eaa95a8
network: prevent a few invalid configuration combinations

This resolves: https://bugzilla.redhat.com/show_bug.cgi?id=767057

It was possible to define a network with <forward mode='bridge'> that
had both a bridge device and a forward device defined. These two are
mutually exclusive by definition (if you are using a bridge device,
then this is a host bridge, and if you have a forward dev defined,
this is using macvtap). It was also possible to put <ip>, <dns>, and
<domain> elements in this definition, although those aren't supported
by the current driver (although it's conceivable that some other
driver might support that).

The items that are invalid by definition, are now checked in the XML
parser (since they will definitely *always* be wrong), and the others
are checked in networkValidate() in the network driver (since, as
mentioned, it's possible that some other network driver, or even this
one, could some day support setting those).
src/conf/network_conf.c
src/libvirt_private.syms
src/network/bridge_driver.c