fix: Deprecated QString::endl

This commit is contained in:
Sirius Bakke 2020-10-07 18:41:09 +02:00
parent bc40683f2a
commit 085bc8a5aa
15 changed files with 131 additions and 133 deletions

View File

@ -80,14 +80,14 @@ CompilerDriver* CompilerDriver_iosacl::clone()
void CompilerDriver_iosacl::printProlog(QTextStream &file, const string &prolog_code)
{
file << endl;
file << "#" << endl;
file << "# Prolog script" << endl;
file << "#" << endl;
file << prolog_code << endl;
file << "#" << endl;
file << "# End of prolog script" << endl;
file << "#" << endl;
file << '\n';
file << "#" << '\n';
file << "# Prolog script" << '\n';
file << "#" << '\n';
file << prolog_code << '\n';
file << "#" << '\n';
file << "# End of prolog script" << '\n';
file << "#" << '\n';
}
string CompilerDriver_iosacl::safetyNetInstall(Firewall *fw)
@ -97,8 +97,7 @@ string CompilerDriver_iosacl::safetyNetInstall(Firewall *fw)
{
/* Generate short temporary ACL and assign it to all
* interfaces. This ACL permits IPSEC (IP proto 50 and UDP port 500)
as well as ssh from given subnet to any.
*/
as well as ssh from given subnet to any. */
string temp_acl_addr = fw->getOptionsObject()->getStr(
safety_net_install_acl_addr_option_name);
@ -201,7 +200,6 @@ string CompilerDriver_iosacl::safetyNetInstall(Firewall *fw)
configlet.setVariable("management_addr", addr.c_str());
configlet.setVariable("management_netm", nnm.toString().c_str());
}
// find management interface
list<FWObject*> ll = fw->getByType(Interface::TYPENAME);
for (FWObject::iterator i=ll.begin(); i!=ll.end(); i++)

View File

@ -79,7 +79,7 @@ QString CompilerDriver_iosacl::assembleManifest(Cluster *, Firewall* , bool )
QTextStream script(&script_buffer, QIODevice::WriteOnly);
script << "!" << manifestMarker()
<< "* " << this->escapeFileName(file_names[FW_FILE]) << endl;
<< "* " << this->escapeFileName(file_names[FW_FILE]) << '\n';
return script_buffer;
}

View File

@ -1,4 +1,4 @@
/*
/*
Firewall Builder
@ -80,14 +80,14 @@ CompilerDriver* CompilerDriver_nxosacl::clone()
void CompilerDriver_nxosacl::printProlog(QTextStream &file, const string &prolog_code)
{
file << endl;
file << "#" << endl;
file << "# Prolog script" << endl;
file << "#" << endl;
file << prolog_code << endl;
file << "#" << endl;
file << "# End of prolog script" << endl;
file << "#" << endl;
file << '\n';
file << "#" << '\n';
file << "# Prolog script" << '\n';
file << "#" << '\n';
file << prolog_code << '\n';
file << "#" << '\n';
file << "# End of prolog script" << '\n';
file << "#" << '\n';
}
string CompilerDriver_nxosacl::safetyNetInstall(Firewall *fw)

View File

@ -79,7 +79,7 @@ QString CompilerDriver_nxosacl::assembleManifest(Cluster *, Firewall* , bool )
QTextStream script(&script_buffer, QIODevice::WriteOnly);
script << "!" << manifestMarker()
<< "* " << this->escapeFileName(file_names[FW_FILE]) << endl;
<< "* " << this->escapeFileName(file_names[FW_FILE]) << '\n';
return script_buffer;
}

View File

@ -75,13 +75,13 @@ string CompilerDriver_pix::protocolInspectorCommands()
void CompilerDriver_pix::printProlog(QTextStream &file, const string &prolog_code)
{
file << endl;
file << "#" << endl;
file << "# Prolog script" << endl;
file << "#" << endl;
file << prolog_code << endl;
file << "#" << endl;
file << "# End of prolog script" << endl;
file << "#" << endl;
file << '\n';
file << "#" << '\n';
file << "# Prolog script" << '\n';
file << "#" << '\n';
file << prolog_code << '\n';
file << "#" << '\n';
file << "# End of prolog script" << '\n';
file << "#" << '\n';
}

View File

@ -105,7 +105,7 @@ QString CompilerDriver_pix::assembleManifest(Cluster*, Firewall*, bool)
QTextStream script(&script_buffer, QIODevice::WriteOnly);
script << "!" << manifestMarker()
<< "* " << this->escapeFileName(file_names[FW_FILE]) << endl;
<< "* " << this->escapeFileName(file_names[FW_FILE]) << '\n';
return script_buffer;
}

View File

@ -56,13 +56,13 @@ CompilerDriver* CompilerDriver_procurve_acl::clone()
void CompilerDriver_procurve_acl::printProlog(QTextStream &file,
const string &prolog_code)
{
file << endl;
file << ";" << endl;
file << "; Prolog script" << endl;
file << ";" << endl;
file << prolog_code << endl;
file << ";" << endl;
file << "; End of prolog script" << endl;
file << ";" << endl;
file << '\n';
file << ";" << '\n';
file << "; Prolog script" << '\n';
file << ";" << '\n';
file << prolog_code << '\n';
file << ";" << '\n';
file << "; End of prolog script" << '\n';
file << ";" << '\n';
}

View File

@ -79,7 +79,7 @@ QString CompilerDriver_procurve_acl::assembleManifest(Cluster*, Firewall*, bool)
QTextStream script(&script_buffer, QIODevice::WriteOnly);
script << ";" << manifestMarker()
<< "* " << this->escapeFileName(file_names[FW_FILE]) << endl;
<< "* " << this->escapeFileName(file_names[FW_FILE]) << '\n';
return script_buffer;
}

View File

@ -657,7 +657,7 @@ QString CompilerDriver_ipt::run(const std::string &cluster_id,
script << QString::fromUtf8(generated_script.c_str());
script << QString::fromUtf8(routing_compiler->getCompiledScript().c_str());
script << endl;
script << '\n';
script_skeleton.setVariable("script_body", indent(4, script_buffer));
@ -676,8 +676,8 @@ QString CompilerDriver_ipt::run(const std::string &cluster_id,
! fw->getOptionsObject()->getBool("use_iptables_restore"));
script_buffer = "";
if (have_ipv4) script << " reset_iptables_v4" << endl;
if (have_ipv6) script << " reset_iptables_v6" << endl;
if (have_ipv4) script << " reset_iptables_v4" << '\n';
if (have_ipv6) script << " reset_iptables_v6" << '\n';
script_skeleton.setVariable("reset_all", script_buffer);
script_buffer = "";

View File

@ -199,7 +199,7 @@ int OSConfigurator_secuwall::generateManagementFile()
stream << "MGM_DEV=\"";
stream << stringify(mgm_iface, " ").c_str();
stream << "\"" << endl;
stream << "\"" << '\n';
/* lookup Management IP address */
mgm_ip = options->getStr("secuwall_mgmt_mgmtaddr").c_str();
@ -221,7 +221,7 @@ int OSConfigurator_secuwall::generateManagementFile()
tmp_v.clear();
tokenize(mgm_ip.toStdString(), tmp_v, ",");
stream << stringify(tmp_v, " ").c_str();
stream << s << "\"" << endl;
stream << s << "\"" << '\n';
}
}
@ -230,7 +230,7 @@ int OSConfigurator_secuwall::generateManagementFile()
tmp_v.clear();
tokenize(options->getStr("secuwall_mgmt_loggingaddr"), tmp_v, ",");
stream << stringify(tmp_v, " ").c_str();
stream << "\"" << endl;
stream << "\"" << '\n';
/* SNMP-Server IP address */
snmp_ip = options->getStr("secuwall_mgmt_snmpaddr").c_str();
@ -246,12 +246,12 @@ int OSConfigurator_secuwall::generateManagementFile()
tmp_v.clear();
tokenize(options->getStr("secuwall_mgmt_snmpaddr"), tmp_v, ",");
stream << stringify(tmp_v, " ").c_str();
stream << "\"" << endl;
stream << "\"" << '\n';
/* SNMP Community string */
stream << "SNMP_COM=\"";
stream << options->getStr("secuwall_mgmt_rosnmp").c_str();
stream << "\"" << endl;
stream << "\"" << '\n';
}
}
@ -260,17 +260,17 @@ int OSConfigurator_secuwall::generateManagementFile()
tmp_v.clear();
tokenize(options->getStr("secuwall_mgmt_ntpaddr"), tmp_v, ",");
stream << stringify(tmp_v, " ").c_str();
stream << "\"" << endl;
stream << "\"" << '\n';
/* /var partition */
stream << "VARPART=\"";
stream << options->getStr("secuwall_mgmt_varpart").c_str();
stream << "\"" << endl;
stream << "\"" << '\n';
/* Configuration partition */
stream << "CFGPART=\"";
stream << options->getStr("secuwall_mgmt_confpart").c_str();
stream << "\"" << endl;
stream << "\"" << '\n';
/* Activate Nagios */
stream << "NRPE=";
@ -278,18 +278,18 @@ int OSConfigurator_secuwall::generateManagementFile()
s = options->getStr("secuwall_mgmt_nagiosaddr").c_str();
if (!s.isEmpty())
{
stream << "yes" << endl;
stream << "yes" << '\n';
/* Nagios-Server IP-Address */
stream << "NRPE_IP=\"";
tmp_v.clear();
tokenize(s.toStdString(), tmp_v, ",");
stream << stringify(tmp_v, " ").c_str();
stream << "\"" << endl;
stream << "\"" << '\n';
}
else
{
stream << "no" << endl;
stream << "no" << '\n';
}
/* VRRP interfaces */
@ -317,20 +317,20 @@ int OSConfigurator_secuwall::generateManagementFile()
stream << "VRRPD=";
if (options->getBool("cluster_member"))
{
stream << "yes" << endl;
stream << "yes" << '\n';
/* VRRP secret */
stream << "VRRPSECRET=\"";
stream << vrrp_secret;
stream << "\"" << endl;
stream << "\"" << '\n';
/* VRRP Master/Slave */
stream << "MASTER=";
stream << (vrrp_master ? "yes" : "no");
stream << endl;
stream << '\n';
}
else
{
stream << "no" << endl;
stream << "no" << '\n';
}
/* conntrackd */
@ -339,15 +339,15 @@ int OSConfigurator_secuwall::generateManagementFile()
stream << "CONNTRACKD=";
if (!s.isEmpty())
{
stream << "yes" << endl;
stream << "yes" << '\n';
/* conntrack device */
stream << "CONN_DEV=\"";
stream << s;
stream << "\"" << endl;
stream << "\"" << '\n';
}
else
{
stream << "no" << endl;
stream << "no" << '\n';
}
/* Write actual management file */
@ -377,7 +377,7 @@ int OSConfigurator_secuwall::generateNetworkFile()
RoutingRule* defaultRoute = nullptr;
/* Prepend static content */
stream << "NETWORKING=yes" << endl;
stream << "NETWORKING=yes" << '\n';
/* Find default route */
FWObjectTypedChildIterator routing_rules = routes->findByType(RoutingRule::TYPENAME);
@ -430,7 +430,7 @@ int OSConfigurator_secuwall::generateNetworkFile()
{
// stream << s;
}
stream << "\"" << endl;
stream << "\"" << '\n';
/* Gateway interface */
stream << "GATEWAYDEV=\"";
@ -438,12 +438,12 @@ int OSConfigurator_secuwall::generateNetworkFile()
{
// stream << s;
}
stream << "\"" << endl;
stream << "\"" << '\n';
/* Hostname */
stream << "HOSTNAME=\"";
stream << fw->getName().c_str();
stream << "\"" << endl;
stream << "\"" << '\n';
/* Routing */
stream << "FORWARD_IPV4=\"";
@ -455,7 +455,7 @@ int OSConfigurator_secuwall::generateNetworkFile()
{
stream << "no";
}
stream << "\"" << endl;
stream << "\"" << '\n';
/* Write actual network file */
string filename = fw->getName() + "/" + network_filename;
@ -477,12 +477,12 @@ int OSConfigurator_secuwall::generateHostsFile()
QTextStream stream (&stream_string);
/* Prepend static content */
stream << "127.0.0.1\tlocalhost\n\n# Secuwall hosts" << endl;
stream << "127.0.0.1\tlocalhost\n\n# Secuwall hosts" << '\n';
/* TODO: Should entries of every fw interface address be appended? */
stream << options->getStr("secuwall_dns_hosts").c_str();
stream << endl;
stream << '\n';
/* Write actual hosts file */
string filename = fw->getName() + "/" + hosts_filename;
@ -509,21 +509,21 @@ int OSConfigurator_secuwall::generateDNSFile()
{
/* Replace \n with " " */
s.replace(QString("\n"), QString(" "));
stream << "search\t\t" << s << endl;
stream << "search\t\t" << s << '\n';
}
/* DNS-Server entries */
s = options->getStr("secuwall_dns_srv1").c_str();
if (!s.isEmpty())
stream << "nameserver\t" << s << endl;
stream << "nameserver\t" << s << '\n';
s = options->getStr("secuwall_dns_srv2").c_str();
if (!s.isEmpty())
stream << "nameserver\t" << s << endl;
stream << "nameserver\t" << s << '\n';
s = options->getStr("secuwall_dns_srv3").c_str();
if (!s.isEmpty())
stream << "nameserver\t" << s << endl;
stream << "nameserver\t" << s << '\n';
/* Write actual DNS file */
string filename = fw->getName() + "/" + dns_filename;
@ -545,7 +545,7 @@ int OSConfigurator_secuwall::generateNsswitchFile()
QTextStream stream(&stream_string);
/* Prepend static content */
stream << "passwd:\t\tfiles\nshadow:\t\tfiles\ngroup:\t\tfiles\n" << endl;
stream << "passwd:\t\tfiles\nshadow:\t\tfiles\ngroup:\t\tfiles\n" << '\n';
/* hosts entries */
stream << "hosts:\t\t";
@ -576,10 +576,10 @@ int OSConfigurator_secuwall::generateNsswitchFile()
s = options->getStr("secuwall_dns_reso5").c_str();
if (!s.isEmpty() && s != "none")
{
stream << " " << s << endl;
stream << " " << s << '\n';
}
stream << endl;
stream << '\n';
/* Append static content */
stream << "ethers:\t\tfiles\nnetmasks:\tfiles\nnetworks:\tfiles\nprotocols:\tfiles\nrpc:\t\tfiles\nservices:\tfiles\n";
@ -638,7 +638,7 @@ int OSConfigurator_secuwall::generateInterfaceFile (Interface * iface, string na
stream << name.c_str();
if (iface_number > 0)
stream << ":" << iface_number;
stream << "\"" << endl;
stream << "\"" << '\n';
/* Boot-Protocol */
stream << "BOOTPROTO=\"";
@ -650,7 +650,7 @@ int OSConfigurator_secuwall::generateInterfaceFile (Interface * iface, string na
{
stream << "none";
}
stream << "\"" << endl;
stream << "\"" << '\n';
/* Address object contains host, network and broadcast address plus netmask */
const Address* ipAddr = nullptr;
@ -662,22 +662,22 @@ int OSConfigurator_secuwall::generateInterfaceFile (Interface * iface, string na
/* Interface IP Address */
stream << "IPADDR=\"";
stream << ipAddr->getAddressPtr()->toString().c_str();
stream << "\"" << endl;
stream << "\"" << '\n';
/* Netmask */
stream << "NETMASK=\"";
stream << ipAddr->getNetmaskPtr()->toString().c_str();
stream << "\"" << endl;
stream << "\"" << '\n';
/* Network IP Address */
stream << "NETWORK=\"";
stream << ipAddr->getNetworkAddressPtr()->toString().c_str();
stream << "\"" << endl;
stream << "\"" << '\n';
/* Broadcast IP Address */
stream << "BROADCAST=\"";
stream << ipAddr->getBroadcastAddressPtr()->toString().c_str();
stream << "\"" << endl;
stream << "\"" << '\n';
}
/* Activate on bootup */
@ -690,7 +690,7 @@ int OSConfigurator_secuwall::generateInterfaceFile (Interface * iface, string na
{
stream << "yes";
}
stream << "\"" << endl;
stream << "\"" << '\n';
/* Link */
stream << "LINK=\"";
@ -698,7 +698,7 @@ int OSConfigurator_secuwall::generateInterfaceFile (Interface * iface, string na
{
stream << options->getStr("iface_options").c_str();
}
stream << "\"" << endl;
stream << "\"" << '\n';
/* MAC-Address */
stream << "MACADDR=\"";
@ -707,7 +707,7 @@ int OSConfigurator_secuwall::generateInterfaceFile (Interface * iface, string na
{
stream << macAddr->getPhysAddress().c_str();
}
stream << "\"" << endl;
stream << "\"" << '\n';
/* MTU */
s.clear();
@ -719,7 +719,7 @@ int OSConfigurator_secuwall::generateInterfaceFile (Interface * iface, string na
s = "1500";
}
stream << s;
stream << "\"" << endl;
stream << "\"" << '\n';
/* Activate ARP */
stream << "ARP=\"";
@ -731,12 +731,12 @@ int OSConfigurator_secuwall::generateInterfaceFile (Interface * iface, string na
{
stream << "yes";
}
stream << "\"" << endl;
stream << "\"" << '\n';
/* Interface type */
stream << "TYPE=\"";
stream << s_mapIfaceStrings[itype].c_str();
stream << "\"" << endl;
stream << "\"" << '\n';
/* get all direct children of type interface */
list<FWObject *> basedevs = iface->getByType(Interface::TYPENAME);
@ -769,7 +769,7 @@ int OSConfigurator_secuwall::generateInterfaceFile (Interface * iface, string na
/* Base Device */
stream << "BASEDEV=\"";
stream << stringify(devs," ").c_str();
stream << "\"" << endl;
stream << "\"" << '\n';
}
break;
@ -781,7 +781,7 @@ int OSConfigurator_secuwall::generateInterfaceFile (Interface * iface, string na
stream << "VLANID=\"";
stream << options->getStr("vlan_id").c_str();
stream << "\"" << endl;
stream << "\"" << '\n';
if (iface->getParent() == nullptr || iface->getParent()->getName().empty())
{
@ -791,7 +791,7 @@ int OSConfigurator_secuwall::generateInterfaceFile (Interface * iface, string na
stream << "BASEDEV=\"";
stream << iface->getParent()->getName().c_str();
stream << "\"" << endl;
stream << "\"" << '\n';
generateInterfaceFile(Interface::cast(iface->getParent()));
break;
@ -805,14 +805,14 @@ int OSConfigurator_secuwall::generateInterfaceFile (Interface * iface, string na
stream << "BASEDEV=\"";
stream << options->getStr("base_device").c_str();
stream << "\"" << endl;
stream << "\"" << '\n';
break;
case ALIAS:
/* Base Device for secondary interfaces*/
stream << "BASEDEV=\"";
stream << name.c_str();
stream << "\"" << endl;
stream << "\"" << '\n';
break;
default:

View File

@ -31,12 +31,12 @@ CompilerDriver* CompilerDriver_junosacl::clone()
void CompilerDriver_junosacl::printProlog(QTextStream &file, const string &prolog_code)
{
file << endl;
file << "/*" << endl;
file << " * Prolog script" << endl;
file << " */" << endl;
file << prolog_code << endl;
file << "/*" << endl;
file << " * End of prolog script" << endl;
file << " */" << endl;
file << '\n';
file << "/*" << '\n';
file << " * Prolog script" << '\n';
file << " */" << '\n';
file << prolog_code << '\n';
file << "/*" << '\n';
file << " * End of prolog script" << '\n';
file << " */" << '\n';
}

View File

@ -39,7 +39,7 @@ QString CompilerDriver_junosacl::assembleManifest(Cluster*, Firewall*, bool)
QTextStream script(&script_buffer, QIODevice::WriteOnly);
script << "/* " << manifestMarker()
<< " * " << this->escapeFileName(file_names[FW_FILE]) << " */" << endl;
<< " * " << this->escapeFileName(file_names[FW_FILE]) << " */" << '\n';
return script_buffer;
}

View File

@ -109,7 +109,7 @@ QString CompilerDriver_ipf::assembleManifest(Cluster*, Firewall* fw, bool )
if (remote_name != file_names[FW_FILE])
script << " " << this->escapeFileName(remote_name);
script << endl;
script << '\n';
if (have_filter)
{
@ -119,7 +119,7 @@ QString CompilerDriver_ipf::assembleManifest(Cluster*, Firewall* fw, bool )
if (remote_ipf_name != file_names[CONF1_FILE])
script << " " << this->escapeFileName(remote_ipf_name);
script << endl;
script << '\n';
}
if (have_nat)
@ -130,7 +130,7 @@ QString CompilerDriver_ipf::assembleManifest(Cluster*, Firewall* fw, bool )
if (remote_nat_name != file_names[CONF2_FILE])
script << " " << this->escapeFileName(remote_nat_name);
script << endl;
script << '\n';
}
return script_buffer;
@ -332,7 +332,7 @@ QString CompilerDriver_ipf::run(const std::string &cluster_id,
{
all_errors.push_back(c.getErrors("").c_str());
ipf_str << "# Policy compiler errors and warnings:"
<< endl;
<< '\n';
ipf_str << QString::fromUtf8(c.getErrors("# ").c_str());
}
ipf_str << QString::fromUtf8(c.getCompiledScript().c_str());
@ -371,7 +371,7 @@ QString CompilerDriver_ipf::run(const std::string &cluster_id,
{
all_errors.push_back(n.getErrors("").c_str());
nat_str << "# NAT compiler errors and warnings:"
<< endl;
<< '\n';
nat_str << QString::fromUtf8(n.getErrors("# ").c_str());
}
nat_str << QString::fromUtf8(n.getCompiledScript().c_str());

View File

@ -80,8 +80,8 @@ QString CompilerDriver_ipfw::assembleManifest(Cluster*, Firewall* , bool )
if (!remote_file_names[FW_FILE].isEmpty())
script << " " << this->escapeFileName(remote_file_names[FW_FILE]);
script << "\n";
script << "#" << endl;
script << "#" << endl;
script << "#" << '\n';
script << "#" << '\n';
return script_buffer;
}

View File

@ -142,14 +142,14 @@ string CompilerDriver_pf::printTimeout(FWOptions* options,
void CompilerDriver_pf::printProlog(QTextStream &file, const string &prolog_code)
{
file << endl;
file << "#" << endl;
file << "# Prolog script" << endl;
file << "#" << endl;
file << prolog_code << endl;
file << "#" << endl;
file << "# End of prolog script" << endl;
file << "#" << endl;
file << '\n';
file << "#" << '\n';
file << "# Prolog script" << '\n';
file << "#" << '\n';
file << prolog_code << '\n';
file << "#" << '\n';
file << "# End of prolog script" << '\n';
file << "#" << '\n';
}
void CompilerDriver_pf::printStaticOptions(QTextStream &file, Firewall* fw)
@ -163,24 +163,24 @@ void CompilerDriver_pf::printStaticOptions(QTextStream &file, Firewall* fw)
if (prolog_place == "pf_file_top")
printProlog(file, pre_hook);
file << endl;
file << '\n';
string set_debug = options->getStr("pf_set_debug");
if (!set_debug.empty())
{
file << "set debug " << set_debug << endl;
file << "set debug " << set_debug << '\n';
}
string state_policy = options->getStr("pf_state_policy");
if (!state_policy.empty())
{
file << "set state-policy " << state_policy << endl;
file << "set state-policy " << state_policy << '\n';
}
string block_policy = options->getStr("pf_block_policy");
if (!block_policy.empty())
{
file << "set block-policy " << block_policy << endl;
file << "set block-policy " << block_policy << '\n';
}
QStringList limits;
@ -215,12 +215,12 @@ void CompilerDriver_pf::printStaticOptions(QTextStream &file, Firewall* fw)
if (limits.size() > 1 ) file << "{ ";
file << limits.join(", ");
if (limits.size() > 1 ) file << " }";
file << endl;
file << '\n';
}
if ( ! options->getStr("pf_optimization").empty() )
file << "set optimization "
<< options->getStr("pf_optimization") << endl;
<< options->getStr("pf_optimization") << '\n';
file << printTimeout(options,
"pf_do_timeout_interval","pf_timeout_interval",
@ -293,11 +293,11 @@ void CompilerDriver_pf::printStaticOptions(QTextStream &file, Firewall* fw)
assert(iface);
if ( iface->isUnprotected())
file << "set skip on " << iface->getName() << endl;
file << "set skip on " << iface->getName() << '\n';
}
}
file << endl;
file << '\n';
if (prolog_place == "pf_file_after_set")
printProlog(file, pre_hook);
@ -329,9 +329,9 @@ void CompilerDriver_pf::printStaticOptions(QTextStream &file, Firewall* fw)
if (!scrub_options.empty())
{
file << "#" << endl;
file << "# Scrub rules" << endl;
file << "#" << endl;
file << "#" << '\n';
file << "# Scrub rules" << '\n';
file << "#" << '\n';
if (XMLTools::version_compare(fw->getStr("version"), "4.6")>=0)
{
@ -339,14 +339,14 @@ void CompilerDriver_pf::printStaticOptions(QTextStream &file, Firewall* fw)
<< scrub_rule_direction
<< "all scrub ("
<< scrub_options.join(" ").toStdString() << ")"
<< endl;
<< '\n';
} else
{
file << "scrub "
<< scrub_rule_direction
<< "all "
<< scrub_options.join(" ").toStdString()
<< endl;
<< '\n';
}
}
@ -366,21 +366,21 @@ void CompilerDriver_pf::printStaticOptions(QTextStream &file, Firewall* fw)
if (XMLTools::version_compare(fw->getStr("version"), "4.6")>=0)
{
file << "match out all scrub ("
<< scrub_options.join(" ").toStdString() << ")" << endl;
<< scrub_options.join(" ").toStdString() << ")" << '\n';
} else
{
file << "scrub out all "
<< scrub_options.join(" ").toStdString() << endl;
<< scrub_options.join(" ").toStdString() << '\n';
}
}
file << endl;
file << '\n';
if (prolog_place == "pf_file_after_scrub")
printProlog(file, pre_hook);
//file << table_factory->PrintTables();
//file << endl;
//file << '\n';
//if (prolog_place == "pf_file_after_tables")
// printProlog(file, pre_hook);