mirror of
https://github.com/fwbuilder/fwbuilder
synced 2026-09-17 10:29:21 +02:00
* OSConfigurator_linux24.cpp (OSConfigurator_linux24::printShellFunctions):
fixes #1084 "if all user turns off all interface management and configuration checkboxes, the check_tools shell function is not added to the script but still called". Shell function "check_tools" verifies that system tools iptables script needs to operate properly are installed on the firewall. These are: ip, modprobe and optionally vconfig, brctl, ifenslave. The bug made compiler for iptables to add the call to the function but function definition was missing if user unchecked all "configure interfaces" checkboxes in the Script tab of firewall object settings dialog.
This commit is contained in:
@@ -1,5 +1,17 @@
|
||||
2010-01-15 vadim <vadim@vk.crocodile.org>
|
||||
|
||||
* OSConfigurator_linux24.cpp (OSConfigurator_linux24::printShellFunctions):
|
||||
fixes #1084 "if all user turns off all interface management and
|
||||
configuration checkboxes, the check_tools shell function is not
|
||||
added to the script but still called". Shell function
|
||||
"check_tools" verifies that system tools iptables script needs to
|
||||
operate properly are installed on the firewall. These are: ip,
|
||||
modprobe and optionally vconfig, brctl, ifenslave. The bug made
|
||||
compiler for iptables to add the call to the function but function
|
||||
definition was missing if user unchecked all "configure
|
||||
interfaces" checkboxes in the Script tab of firewall object
|
||||
settings dialog.
|
||||
|
||||
* CompilerDriver_ipt_run.cpp (CompilerDriver_ipt::run): Refs #869
|
||||
making sure non-english comments appear correctly in the single
|
||||
rule compile output and generated configuration files and scripts.
|
||||
|
||||
@@ -308,22 +308,21 @@ string OSConfigurator_linux24::printShellFunctions()
|
||||
/* check if package iproute2 is installed, but do this only if
|
||||
* we really need /usr/sbin/ip
|
||||
*/
|
||||
Configlet configlet(fw, "linux24", "check_utilities");
|
||||
configlet.removeComments();
|
||||
|
||||
if (options->getBool("verify_interfaces") ||
|
||||
options->getBool("manage_virtual_addr") ||
|
||||
options->getBool("configure_interfaces") )
|
||||
{
|
||||
Configlet configlet(fw, "linux24", "check_utilities");
|
||||
configlet.removeComments();
|
||||
|
||||
configlet.setVariable("need_vconfig",
|
||||
options->getBool("configure_vlan_interfaces"));
|
||||
configlet.setVariable("need_brctl",
|
||||
options->getBool("configure_bridge_interfaces"));
|
||||
configlet.setVariable("need_ifenslave",
|
||||
options->getBool("configure_bonding_interfaces"));
|
||||
|
||||
str << configlet.expand().toStdString();
|
||||
}
|
||||
str << configlet.expand().toStdString();
|
||||
|
||||
/*
|
||||
* Generate commands to reset all tables and chains and set
|
||||
|
||||
@@ -2942,7 +2942,7 @@
|
||||
</ServiceGroup>
|
||||
</ServiceGroup>
|
||||
<ObjectGroup id="stdid12_1" name="Firewalls" comment="" ro="False">
|
||||
<Firewall id="fw-firewall2" host_OS="linux24" inactive="False" lastCompiled="1261179871" lastInstalled="1142003872" lastModified="1263579154" platform="iptables" version="" name="firewall" comment="this is simple firewall with two interfaces. Test regular policy rules, including IP_fragments rule" ro="False">
|
||||
<Firewall id="fw-firewall2" host_OS="linux24" inactive="False" lastCompiled="1263587792" lastInstalled="1142003872" lastModified="1263579154" platform="iptables" version="" name="firewall" comment="this is simple firewall with two interfaces. Test regular policy rules, including IP_fragments rule" ro="False">
|
||||
<NAT id="nat-firewall2" name="NAT" comment="" ro="False" ipv4_rule_set="False" ipv6_rule_set="False" top_rule_set="True">
|
||||
<NATRule id="nat-firewall2-0" disabled="False" position="0" action="Translate" comment="">
|
||||
<OSrc neg="False">
|
||||
@@ -9689,7 +9689,7 @@
|
||||
<Option name="verify_interfaces">False</Option>
|
||||
</FirewallOptions>
|
||||
</Firewall>
|
||||
<Firewall id="id3B19BEE6" host_OS="linux24" lastCompiled="1247364158" lastInstalled="1142003872" lastModified="1262968608" platform="iptables" name="firewall5" comment="testing firewall_is_part_of_any_and_networks also testing SNAT and DNAT rules when external interface has dynamic address dynamic interface ppp0 has an address object attached to it (interface used to be static and had an address, then got converted to dynamic but address object is still there). Compiler should ignore this address object and issue a warning. " ro="False">
|
||||
<Firewall id="id3B19BEE6" host_OS="linux24" inactive="False" lastCompiled="1247364158" lastInstalled="1142003872" lastModified="1263587776" platform="iptables" version="" name="firewall5" comment="testing firewall_is_part_of_any_and_networks. Also testing SNAT and DNAT rules when external interface has dynamic address. dynamic interface ppp0 has an address object attached to it (interface used to be static and had an address, then got converted to dynamic but address object is still there). Compiler should ignore this address object and issue a warning. All "configure interfaces" options are off, testing shell functions for this case." ro="False">
|
||||
<NAT id="id3B19BEE7" name="NAT" comment="" ro="False" ipv4_rule_set="False" ipv6_rule_set="False" top_rule_set="True">
|
||||
<NATRule id="id3CFD9EE2" disabled="False" position="0" action="Translate" comment="">
|
||||
<OSrc neg="False">
|
||||
|
||||
Reference in New Issue
Block a user