diff options
author | 2009-11-05 20:28:11 +0100 | |
---|---|---|
committer | 2009-11-16 13:32:00 +0100 | |
commit | 91f9157e5b807ba641bc52593911f037445ec613 (patch) | |
tree | 61223a1f09329629114b29bba39d6d34e18dbe42 | |
parent | esx: Fix CPU clock Hz to MHz conversion (diff) | |
download | libvirt-91f9157e5b807ba641bc52593911f037445ec613.tar.gz libvirt-91f9157e5b807ba641bc52593911f037445ec613.tar.bz2 libvirt-91f9157e5b807ba641bc52593911f037445ec613.zip |
only remove masquerade roles for VIR_NETWORK_FORWARD_NAT
Fixes http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=549949
-rw-r--r-- | src/network/bridge_driver.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/network/bridge_driver.c b/src/network/bridge_driver.c index 905c498c7..0342aa082 100644 --- a/src/network/bridge_driver.c +++ b/src/network/bridge_driver.c @@ -783,16 +783,15 @@ static void networkRemoveIptablesRules(struct network_driver *driver, virNetworkObjPtr network) { if (network->def->forwardType != VIR_NETWORK_FORWARD_NONE) { - iptablesRemoveForwardMasquerade(driver->iptables, - network->def->network, - network->def->forwardDev); - - if (network->def->forwardType == VIR_NETWORK_FORWARD_NAT) + if (network->def->forwardType == VIR_NETWORK_FORWARD_NAT) { + iptablesRemoveForwardMasquerade(driver->iptables, + network->def->network, + network->def->forwardDev); iptablesRemoveForwardAllowRelatedIn(driver->iptables, network->def->network, network->def->bridge, network->def->forwardDev); - else if (network->def->forwardType == VIR_NETWORK_FORWARD_ROUTE) + } else if (network->def->forwardType == VIR_NETWORK_FORWARD_ROUTE) iptablesRemoveForwardAllowIn(driver->iptables, network->def->network, network->def->bridge, |