]> git.ipfire.org Git - thirdparty/libvirt.git/commit
network: don't allow multiple default portgroups
authorLaine Stump <laine@laine.org>
Sat, 20 Oct 2012 08:39:18 +0000 (04:39 -0400)
committerLaine Stump <laine@laine.org>
Sun, 21 Oct 2012 01:29:19 +0000 (21:29 -0400)
commit6f8a8b30c9a0123d8c6f49c946084b94c580811b
tree4db6f3f9942b3292517bad8de7da7f0640b00224
parent1cb1f9dabf8e9c9fc8dfadbb3097776ca5f2c68c
network: don't allow multiple default portgroups

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

virNetworkUpdate, virNetworkDefine, and virNetworkCreate all three
allow network definitions to contain multiple <portgroup> elements
with default='yes'. Only a single default portgroup should be allowed
for each network.

This patch updates networkValidate() (called by both
virNetworkCreate() and virNetworkDefine()) and
virNetworkDefUpdatePortGroup (called by virNetworkUpdate() to not
allow multiple default portgroups.
src/conf/network_conf.c
src/network/bridge_driver.c