]> git.ipfire.org Git - thirdparty/libvirt.git/commit
network: fill in bandwidth from portgroup for all forward modes
authorLaine Stump <laine@laine.org>
Tue, 4 Oct 2011 03:53:36 +0000 (23:53 -0400)
committerLaine Stump <laine@laine.org>
Tue, 4 Oct 2011 13:13:18 +0000 (09:13 -0400)
commit6c9e2eb23bd11279adcf49fec304602efeaeff8d
tree19c8b3434866dd83e510947191f07a0ea22300cc
parent92888c803b6e2479fb0034a24fc3de24761a0e94
network: fill in bandwidth from portgroup for all forward modes

This patch is a fix for:

  https://bugzilla.redhat.com/show_bug.cgi?id=743176

which was discovered by Dan Berrange while making bandwidth
configuration work for LXC guests.

Background: Although virtportprofile data from a network portgroup is
only applicable for direct mode interfaces, the code that copies
bandwidth data from the portgroup was also only being executed in the
case of direct mode interfaces. The result was that interfaces using
traditional virtual networks (forward mode='nat|route|none'), and
those using a host bridge for forwarding, would not pick up bandwidth
data from a portgroup defined in the network.

This patch moves that code outside the conditional, so that bandwidth
information is *alway* copied from the appropriate portgroup (unless
the <interface> definition itself already has bandwidth information,
which would take precedence over what's in the portgroup anyway).
src/conf/domain_conf.c
src/network/bridge_driver.c