mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-25 01:34:11 +03:00
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,7 +990,8 @@ networkRemoveIptablesRules(struct network_driver *driver,
|
||||
iptablesRemoveForwardAllowCross(driver->iptables, network->def->bridge);
|
||||
iptablesRemoveForwardRejectIn(driver->iptables, network->def->bridge);
|
||||
iptablesRemoveForwardRejectOut(driver->iptables, network->def->bridge);
|
||||
iptablesRemoveUdpInput(driver->iptables, network->def->bridge, 69);
|
||||
if (network->def->tftproot)
|
||||
iptablesRemoveUdpInput(driver->iptables, network->def->bridge, 69);
|
||||
iptablesRemoveUdpInput(driver->iptables, network->def->bridge, 53);
|
||||
iptablesRemoveTcpInput(driver->iptables, network->def->bridge, 53);
|
||||
iptablesRemoveUdpInput(driver->iptables, network->def->bridge, 67);
|
||||
|
Loading…
Reference in New Issue
Block a user