mirror of https://gitee.com/openkylin/libvirt.git
Only attempt removal of the rule allowing tftp if it was added
During virtual network startup, the iptables rule that allows tftp traffic is only added if network->def->tftproot is non-empty, but when the virtual network is destroyed, we had been unconditionally trying to delete the rule. This was harmless, except that it created a bogus error message. This patch conditionalizes the delete command in the same manner that the insert command is already conditionalized.
This commit is contained in:
parent
1dd49e921f
commit
0111cebb5a
|
@ -990,6 +990,7 @@ networkRemoveIptablesRules(struct network_driver *driver,
|
||||||
iptablesRemoveForwardAllowCross(driver->iptables, network->def->bridge);
|
iptablesRemoveForwardAllowCross(driver->iptables, network->def->bridge);
|
||||||
iptablesRemoveForwardRejectIn(driver->iptables, network->def->bridge);
|
iptablesRemoveForwardRejectIn(driver->iptables, network->def->bridge);
|
||||||
iptablesRemoveForwardRejectOut(driver->iptables, network->def->bridge);
|
iptablesRemoveForwardRejectOut(driver->iptables, network->def->bridge);
|
||||||
|
if (network->def->tftproot)
|
||||||
iptablesRemoveUdpInput(driver->iptables, network->def->bridge, 69);
|
iptablesRemoveUdpInput(driver->iptables, network->def->bridge, 69);
|
||||||
iptablesRemoveUdpInput(driver->iptables, network->def->bridge, 53);
|
iptablesRemoveUdpInput(driver->iptables, network->def->bridge, 53);
|
||||||
iptablesRemoveTcpInput(driver->iptables, network->def->bridge, 53);
|
iptablesRemoveTcpInput(driver->iptables, network->def->bridge, 53);
|
||||||
|
|
Loading…
Reference in New Issue