]> xenbits.xensource.com Git - libvirt.git/commit
network: use bandwidth from portgroup when appropriate
authorLaine Stump <laine@laine.org>
Wed, 16 Jan 2013 17:46:01 +0000 (12:46 -0500)
committerLaine Stump <laine@laine.org>
Thu, 17 Jan 2013 17:38:51 +0000 (12:38 -0500)
commit7d480a4650a4843596d25f8041f20e4b6d967d74
tree766b0e26d72f07941d2efe9b145f58cb216fe6d8
parent35ed25bde9e0d1061ef9a96edcd968a5b4c8a375
network: use bandwidth from portgroup when appropriate

The bandwidth plug and unplug functions were assuming that an
interface's bandwidth setting was always specified directly in the
domain's <interface> definition, but that's not necessarily true - it
could have been obtained from a <portgroup> definition in the network
definition. This patch fixes those functions to use
virDomainNetGetActualBandwidth(), which gets the bandwidth pointer
from iface->data.network.actual if it exists, otherwise returns
iface->bandwidth.
src/network/bridge_driver.c