Re: [PATCH] Only attempt removal of the rule allowing tftp if it was added

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2010/10/28 Laine Stump <laine@xxxxxxxxx>:
> 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.
> ---
> Âsrc/network/bridge_driver.c | Â Â3 ++-
> Â1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/src/network/bridge_driver.c b/src/network/bridge_driver.c
> index 0777d85..631fbf1 100644
> --- a/src/network/bridge_driver.c
> +++ b/src/network/bridge_driver.c
> @@ -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);
> --
> 1.7.2.3
>

ACK, fixes the bogus error message.

Matthias

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]