]> git.ipfire.org Git - thirdparty/libvirt.git/commit
network: don't add iptables rules for externally managed networks
authorLaine Stump <laine@redhat.com>
Tue, 6 Dec 2011 20:13:50 +0000 (15:13 -0500)
committerEric Blake <eblake@redhat.com>
Wed, 16 May 2012 23:13:08 +0000 (17:13 -0600)
commit762801607a11b8379ec871168230ea7ee79e37bd
tree390de98f85878172a0444faab6051275705f879f
parentd20a6240b35674f2cdca080e8cce6b778224849d
network: don't add iptables rules for externally managed networks

This patch addresses https://bugzilla.redhat.com/show_bug.cgi?id=760442

When a network has any forward type other than route, nat or none, the
network configuration should be done completely external to libvirt -
libvirt only uses these types to allow configuring guests in a manner
that isn't tied to a specific host (all the host-specific information,
in particular interface names, port profile data, and bandwidth
configuration is in the network definition, and the guest
configuration only references it).

Due to a bug in the bridge network driver, libvirt was adding iptables
rules for networks with forward type='bridge' etc. any time libvirtd
was restarted while one of these networks was active.

This patch eliminates that error by only "reloading" iptables rules if
forward type is route, nat, or none.
(cherry picked from commit ae1232b298323dd7bef909426e2ebafa6bca9157)
src/network/bridge_driver.c