Fix removal of iptable forwarding rules

This commit is contained in:
Daniel P. Berrange 2008-05-22 15:49:50 +00:00
parent 3e1aeff4c5
commit 42aec3d000
2 changed files with 18 additions and 6 deletions

View File

@ -1,3 +1,7 @@
Thu May 22 11:49:29 EST 2008 Daniel P. Berrange <berrange@redhat.com>
* src/qemu_driver.c: Fix removal of iptables forwarding rules
Thu May 22 11:38:29 EST 2008 Daniel P. Berrange <berrange@redhat.com> Thu May 22 11:38:29 EST 2008 Daniel P. Berrange <berrange@redhat.com>
* configure.in: Remove some duplicated error messages * configure.in: Remove some duplicated error messages

View File

@ -1215,10 +1215,18 @@ qemudRemoveIptablesRules(struct qemud_driver *driver,
iptablesRemoveForwardMasquerade(driver->iptables, iptablesRemoveForwardMasquerade(driver->iptables,
network->def->network, network->def->network,
network->def->forwardDev); network->def->forwardDev);
if (network->def->forwardMode == QEMUD_NET_FORWARD_NAT)
iptablesRemoveForwardAllowRelatedIn(driver->iptables,
network->def->network,
network->bridge,
network->def->forwardDev);
else if (network->def->forwardMode == QEMUD_NET_FORWARD_ROUTE)
iptablesRemoveForwardAllowIn(driver->iptables, iptablesRemoveForwardAllowIn(driver->iptables,
network->def->network, network->def->network,
network->bridge, network->bridge,
network->def->forwardDev); network->def->forwardDev);
iptablesRemoveForwardAllowOut(driver->iptables, iptablesRemoveForwardAllowOut(driver->iptables,
network->def->network, network->def->network,
network->bridge, network->bridge,