mirror of
https://github.com/fwbuilder/fwbuilder
synced 2026-05-10 19:14:57 +02:00
refactor: Disable unused variables in production code
This commit is contained in:
@@ -916,8 +916,10 @@ void CompilerDriver_pix::pixClusterConfigurationChecks(Cluster *cluster,
|
|||||||
failover_group->findByType(FWObjectReference::TYPENAME);
|
failover_group->findByType(FWObjectReference::TYPENAME);
|
||||||
it != it.end(); ++it)
|
it != it.end(); ++it)
|
||||||
{
|
{
|
||||||
|
#ifndef NDEBUG
|
||||||
Interface *member_iface = Interface::cast(FWObjectReference::getObject(*it));
|
Interface *member_iface = Interface::cast(FWObjectReference::getObject(*it));
|
||||||
assert(member_iface);
|
assert(member_iface);
|
||||||
|
#endif
|
||||||
|
|
||||||
pixClusterGroupChecks(failover_group);
|
pixClusterGroupChecks(failover_group);
|
||||||
|
|
||||||
|
|||||||
@@ -241,8 +241,10 @@ string NATCompiler_pix::debugPrintRule(Rule *r)
|
|||||||
{
|
{
|
||||||
NATRule *rule=NATRule::cast(r);
|
NATRule *rule=NATRule::cast(r);
|
||||||
|
|
||||||
|
#ifndef NDEBUG
|
||||||
RuleElementItfInb *itf_in_re = rule->getItfInb(); assert(itf_in_re!=NULL);
|
RuleElementItfInb *itf_in_re = rule->getItfInb(); assert(itf_in_re!=NULL);
|
||||||
RuleElementItfOutb *itf_out_re = rule->getItfOutb(); assert(itf_out_re!=NULL);
|
RuleElementItfOutb *itf_out_re = rule->getItfOutb(); assert(itf_out_re!=NULL);
|
||||||
|
#endif
|
||||||
|
|
||||||
ostringstream os;
|
ostringstream os;
|
||||||
|
|
||||||
@@ -568,11 +570,15 @@ bool NATCompiler_pix::verifyRuleElements::processNext()
|
|||||||
{
|
{
|
||||||
NATRule *rule=getNext(); if (rule==NULL) return false;
|
NATRule *rule=getNext(); if (rule==NULL) return false;
|
||||||
|
|
||||||
|
#ifndef NDEBUG
|
||||||
Address *osrc=compiler->getFirstOSrc(rule); assert(osrc);
|
Address *osrc=compiler->getFirstOSrc(rule); assert(osrc);
|
||||||
|
#endif
|
||||||
Address *odst=compiler->getFirstODst(rule); assert(odst);
|
Address *odst=compiler->getFirstODst(rule); assert(odst);
|
||||||
Service *osrv=compiler->getFirstOSrv(rule); assert(osrv);
|
Service *osrv=compiler->getFirstOSrv(rule); assert(osrv);
|
||||||
|
|
||||||
|
#ifndef NDEBUG
|
||||||
Address *tsrc=compiler->getFirstTSrc(rule); assert(tsrc);
|
Address *tsrc=compiler->getFirstTSrc(rule); assert(tsrc);
|
||||||
|
#endif
|
||||||
Address *tdst=compiler->getFirstTDst(rule); assert(tdst);
|
Address *tdst=compiler->getFirstTDst(rule); assert(tdst);
|
||||||
Service *tsrv=compiler->getFirstTSrv(rule); assert(tsrv);
|
Service *tsrv=compiler->getFirstTSrv(rule); assert(tsrv);
|
||||||
|
|
||||||
|
|||||||
@@ -100,7 +100,9 @@ list<NATRule*> NATCompiler_pix::findMatchingDNATRules(
|
|||||||
Address *odst = getFirstODst(rule); assert(odst);
|
Address *odst = getFirstODst(rule); assert(odst);
|
||||||
Service *osrv = getFirstOSrv(rule); assert(osrv);
|
Service *osrv = getFirstOSrv(rule); assert(osrv);
|
||||||
|
|
||||||
|
#ifndef NDEBUG
|
||||||
Address *tsrc = getFirstTSrc(rule); assert(tsrc);
|
Address *tsrc = getFirstTSrc(rule); assert(tsrc);
|
||||||
|
#endif
|
||||||
// Address *tdst = getFirstTDst(rule); assert(tdst);
|
// Address *tdst = getFirstTDst(rule); assert(tdst);
|
||||||
Service *tsrv = getFirstTSrv(rule); assert(tsrv);
|
Service *tsrv = getFirstTSrv(rule); assert(tsrv);
|
||||||
|
|
||||||
|
|||||||
@@ -431,7 +431,9 @@ bool NATCompiler_pix::DetectOverlappingGlobalPoolsAndStaticRules::processNext()
|
|||||||
if (rule->getRuleType()== NATRule::DNAT )
|
if (rule->getRuleType()== NATRule::DNAT )
|
||||||
{
|
{
|
||||||
Address *outa=compiler->getFirstODst(rule); assert(outa);
|
Address *outa=compiler->getFirstODst(rule); assert(outa);
|
||||||
|
#ifndef NDEBUG
|
||||||
Address *insa=compiler->getFirstTDst(rule); assert(insa);
|
Address *insa=compiler->getFirstTDst(rule); assert(insa);
|
||||||
|
#endif
|
||||||
|
|
||||||
for (map<int,NATCmd*>::iterator i=pix_comp->nat_commands.begin();
|
for (map<int,NATCmd*>::iterator i=pix_comp->nat_commands.begin();
|
||||||
i!=pix_comp->nat_commands.end(); ++i)
|
i!=pix_comp->nat_commands.end(); ++i)
|
||||||
|
|||||||
@@ -163,13 +163,15 @@ void NATCompiler_pix::PrintRule::printNONAT(NATRule *rule)
|
|||||||
string("/FWBuilderResources/Target/options/")+
|
string("/FWBuilderResources/Target/options/")+
|
||||||
"version_"+version+"/pix_commands/clear_acl");
|
"version_"+version+"/pix_commands/clear_acl");
|
||||||
|
|
||||||
Address *osrc=compiler->getFirstOSrc(rule); assert(osrc);
|
|
||||||
Address *odst=compiler->getFirstODst(rule); assert(odst);
|
Address *odst=compiler->getFirstODst(rule); assert(odst);
|
||||||
|
#ifndef NDEBUG
|
||||||
|
Address *osrc=compiler->getFirstOSrc(rule); assert(osrc);
|
||||||
Service *osrv=compiler->getFirstOSrv(rule); assert(osrv);
|
Service *osrv=compiler->getFirstOSrv(rule); assert(osrv);
|
||||||
|
|
||||||
Address *tsrc=compiler->getFirstTSrc(rule); assert(tsrc);
|
Address *tsrc=compiler->getFirstTSrc(rule); assert(tsrc);
|
||||||
Address *tdst=compiler->getFirstTDst(rule); assert(tdst);
|
Address *tdst=compiler->getFirstTDst(rule); assert(tdst);
|
||||||
Service *tsrv=compiler->getFirstTSrv(rule); assert(tsrv);
|
Service *tsrv=compiler->getFirstTSrv(rule); assert(tsrv);
|
||||||
|
#endif
|
||||||
|
|
||||||
RuleElementItfInb *itf_in_re = rule->getItfInb(); assert(itf_in_re!=NULL);
|
RuleElementItfInb *itf_in_re = rule->getItfInb(); assert(itf_in_re!=NULL);
|
||||||
RuleElementItfOutb *itf_out_re = rule->getItfOutb(); assert(itf_out_re!=NULL);
|
RuleElementItfOutb *itf_out_re = rule->getItfOutb(); assert(itf_out_re!=NULL);
|
||||||
@@ -262,9 +264,11 @@ void NATCompiler_pix::PrintRule::printSNAT(NATRule *rule)
|
|||||||
Address *odst = compiler->getFirstODst(rule); assert(odst);
|
Address *odst = compiler->getFirstODst(rule); assert(odst);
|
||||||
Service *osrv = compiler->getFirstOSrv(rule); assert(osrv);
|
Service *osrv = compiler->getFirstOSrv(rule); assert(osrv);
|
||||||
|
|
||||||
|
#ifndef NDEBUG
|
||||||
Address *tsrc = compiler->getFirstTSrc(rule); assert(tsrc);
|
Address *tsrc = compiler->getFirstTSrc(rule); assert(tsrc);
|
||||||
Address *tdst = compiler->getFirstTDst(rule); assert(tdst);
|
Address *tdst = compiler->getFirstTDst(rule); assert(tdst);
|
||||||
Service *tsrv = compiler->getFirstTSrv(rule); assert(tsrv);
|
Service *tsrv = compiler->getFirstTSrv(rule); assert(tsrv);
|
||||||
|
#endif
|
||||||
|
|
||||||
RuleElementItfInb *itf_in_re = rule->getItfInb(); assert(itf_in_re!=NULL);
|
RuleElementItfInb *itf_in_re = rule->getItfInb(); assert(itf_in_re!=NULL);
|
||||||
RuleElementItfOutb *itf_out_re = rule->getItfOutb(); assert(itf_out_re!=NULL);
|
RuleElementItfOutb *itf_out_re = rule->getItfOutb(); assert(itf_out_re!=NULL);
|
||||||
@@ -392,13 +396,16 @@ void NATCompiler_pix::PrintRule::printDNAT(NATRule *rule)
|
|||||||
string("/FWBuilderResources/Target/options/") +
|
string("/FWBuilderResources/Target/options/") +
|
||||||
"version_" + version+"/pix_commands/clear_acl");
|
"version_" + version+"/pix_commands/clear_acl");
|
||||||
|
|
||||||
|
Service *osrv = compiler->getFirstOSrv(rule); assert(osrv);
|
||||||
|
|
||||||
|
#ifndef NDEBUG
|
||||||
Address *osrc = compiler->getFirstOSrc(rule); assert(osrc);
|
Address *osrc = compiler->getFirstOSrc(rule); assert(osrc);
|
||||||
Address *odst = compiler->getFirstODst(rule); assert(odst);
|
Address *odst = compiler->getFirstODst(rule); assert(odst);
|
||||||
Service *osrv = compiler->getFirstOSrv(rule); assert(osrv);
|
|
||||||
|
|
||||||
Address *tsrc = compiler->getFirstTSrc(rule); assert(tsrc);
|
Address *tsrc = compiler->getFirstTSrc(rule); assert(tsrc);
|
||||||
Address *tdst = compiler->getFirstTDst(rule); assert(tdst);
|
Address *tdst = compiler->getFirstTDst(rule); assert(tdst);
|
||||||
Service *tsrv = compiler->getFirstTSrv(rule); assert(tsrv);
|
Service *tsrv = compiler->getFirstTSrv(rule); assert(tsrv);
|
||||||
|
#endif
|
||||||
|
|
||||||
RuleElementItfInb *itf_in_re = rule->getItfInb(); assert(itf_in_re!=NULL);
|
RuleElementItfInb *itf_in_re = rule->getItfInb(); assert(itf_in_re!=NULL);
|
||||||
RuleElementItfOutb *itf_out_re = rule->getItfOutb(); assert(itf_out_re!=NULL);
|
RuleElementItfOutb *itf_out_re = rule->getItfOutb(); assert(itf_out_re!=NULL);
|
||||||
|
|||||||
@@ -659,8 +659,10 @@ string OSConfigurator_pix_os::_printSysopt()
|
|||||||
string platform = fw->getStr("platform");
|
string platform = fw->getStr("platform");
|
||||||
string version = fw->getStr("version");
|
string version = fw->getStr("version");
|
||||||
|
|
||||||
|
#ifndef NDEBUG
|
||||||
FWOptions *options=fw->getOptionsObject();
|
FWOptions *options=fw->getOptionsObject();
|
||||||
assert(options!=NULL);
|
assert(options!=NULL);
|
||||||
|
#endif
|
||||||
|
|
||||||
bool tcpmss = fw->getOptionsObject()->getBool("pix_tcpmss");
|
bool tcpmss = fw->getOptionsObject()->getBool("pix_tcpmss");
|
||||||
int tcpmss_val = fw->getOptionsObject()->getInt("pix_tcpmss_value");
|
int tcpmss_val = fw->getOptionsObject()->getInt("pix_tcpmss_value");
|
||||||
|
|||||||
@@ -135,8 +135,11 @@ void PolicyCompiler_pix::replaceTranslatedAddresses::action(
|
|||||||
FWObject *rule_iface = FWObjectReference::getObject(intf_re->front());
|
FWObject *rule_iface = FWObjectReference::getObject(intf_re->front());
|
||||||
|
|
||||||
RuleElement *re = nat_rule->getOSrc();
|
RuleElement *re = nat_rule->getOSrc();
|
||||||
|
|
||||||
FWObject *o = FWReference::getObject(re->front());
|
FWObject *o = FWReference::getObject(re->front());
|
||||||
|
#ifndef NDEBUG
|
||||||
Address *osrc = Address::cast(o); assert(osrc);
|
Address *osrc = Address::cast(o); assert(osrc);
|
||||||
|
#endif
|
||||||
|
|
||||||
re = nat_rule->getODst();
|
re = nat_rule->getODst();
|
||||||
o = FWReference::getObject(re->front());
|
o = FWReference::getObject(re->front());
|
||||||
@@ -146,6 +149,7 @@ void PolicyCompiler_pix::replaceTranslatedAddresses::action(
|
|||||||
o = FWReference::getObject(re->front());
|
o = FWReference::getObject(re->front());
|
||||||
Service *osrv = Service::cast(o); assert(osrv);
|
Service *osrv = Service::cast(o); assert(osrv);
|
||||||
|
|
||||||
|
#ifndef NDEBUG
|
||||||
re = nat_rule->getTSrc();
|
re = nat_rule->getTSrc();
|
||||||
o = FWReference::getObject(re->front());
|
o = FWReference::getObject(re->front());
|
||||||
Address *tsrc = Address::cast(o); assert(tsrc);
|
Address *tsrc = Address::cast(o); assert(tsrc);
|
||||||
@@ -157,7 +161,7 @@ void PolicyCompiler_pix::replaceTranslatedAddresses::action(
|
|||||||
re = nat_rule->getTSrv();
|
re = nat_rule->getTSrv();
|
||||||
o = FWReference::getObject(re->front());
|
o = FWReference::getObject(re->front());
|
||||||
Service *tsrv = Service::cast(o); assert(tsrv);
|
Service *tsrv = Service::cast(o); assert(tsrv);
|
||||||
|
#endif
|
||||||
|
|
||||||
FWObject *p = odst->getParent();
|
FWObject *p = odst->getParent();
|
||||||
|
|
||||||
|
|||||||
@@ -173,7 +173,9 @@ bool PolicyCompiler_pix::EmulateOutboundACL_v6::processNext()
|
|||||||
if ( compiler->fw->getOptionsObject()->getBool("pix_emulate_out_acl") )
|
if ( compiler->fw->getOptionsObject()->getBool("pix_emulate_out_acl") )
|
||||||
{
|
{
|
||||||
RuleElementSrc *src = rule->getSrc(); assert(src);
|
RuleElementSrc *src = rule->getSrc(); assert(src);
|
||||||
|
#ifndef NDEBUG
|
||||||
RuleElementDst *dst = rule->getDst(); assert(dst);
|
RuleElementDst *dst = rule->getDst(); assert(dst);
|
||||||
|
#endif
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -397,6 +397,7 @@ void IPTImporter::addSrv()
|
|||||||
void IPTImporter::processModuleMatches()
|
void IPTImporter::processModuleMatches()
|
||||||
{
|
{
|
||||||
PolicyRule *rule = PolicyRule::cast(current_rule);
|
PolicyRule *rule = PolicyRule::cast(current_rule);
|
||||||
|
#ifndef NDEBUG
|
||||||
RuleElementSrv* srv = rule->getSrv();
|
RuleElementSrv* srv = rule->getSrv();
|
||||||
assert(srv!=NULL);
|
assert(srv!=NULL);
|
||||||
|
|
||||||
@@ -405,6 +406,7 @@ void IPTImporter::processModuleMatches()
|
|||||||
|
|
||||||
FWOptions *ropt = current_rule->getOptionsObject();
|
FWOptions *ropt = current_rule->getOptionsObject();
|
||||||
assert(ropt!=NULL);
|
assert(ropt!=NULL);
|
||||||
|
#endif
|
||||||
|
|
||||||
addAllModuleMatches(rule);
|
addAllModuleMatches(rule);
|
||||||
|
|
||||||
@@ -1251,11 +1253,13 @@ void IPTImporter::pushNATRule()
|
|||||||
|
|
||||||
NATRule *rule = NATRule::cast(current_rule);
|
NATRule *rule = NATRule::cast(current_rule);
|
||||||
|
|
||||||
|
#ifndef NDEBUG
|
||||||
FWOptions *fwopt = getFirewallObject()->getOptionsObject();
|
FWOptions *fwopt = getFirewallObject()->getOptionsObject();
|
||||||
assert(fwopt!=NULL);
|
assert(fwopt!=NULL);
|
||||||
|
|
||||||
FWOptions *ropt = current_rule->getOptionsObject();
|
FWOptions *ropt = current_rule->getOptionsObject();
|
||||||
assert(ropt!=NULL);
|
assert(ropt!=NULL);
|
||||||
|
#endif
|
||||||
|
|
||||||
addOSrc();
|
addOSrc();
|
||||||
addODst();
|
addODst();
|
||||||
|
|||||||
@@ -478,9 +478,11 @@ bool NATCompiler_ipt::VerifyRules::processNext()
|
|||||||
{
|
{
|
||||||
NATRule *rule=getNext(); if (rule==NULL) return false;
|
NATRule *rule=getNext(); if (rule==NULL) return false;
|
||||||
|
|
||||||
|
#ifndef NDEBUG
|
||||||
RuleElementOSrc *osrc=rule->getOSrc(); assert(osrc);
|
RuleElementOSrc *osrc=rule->getOSrc(); assert(osrc);
|
||||||
RuleElementODst *odst=rule->getODst(); assert(odst);
|
RuleElementODst *odst=rule->getODst(); assert(odst);
|
||||||
RuleElementOSrv *osrv=rule->getOSrv(); assert(osrv);
|
RuleElementOSrv *osrv=rule->getOSrv(); assert(osrv);
|
||||||
|
#endif
|
||||||
|
|
||||||
RuleElementTSrc *tsrc=rule->getTSrc(); assert(tsrc);
|
RuleElementTSrc *tsrc=rule->getTSrc(); assert(tsrc);
|
||||||
RuleElementTDst *tdst=rule->getTDst(); assert(tdst);
|
RuleElementTDst *tdst=rule->getTDst(); assert(tdst);
|
||||||
|
|||||||
@@ -558,8 +558,10 @@ string PolicyCompiler_ipt::PrintRule::_printActionOnReject(PolicyRule *rule)
|
|||||||
PolicyCompiler_ipt *ipt_comp = dynamic_cast<PolicyCompiler_ipt*>(compiler);
|
PolicyCompiler_ipt *ipt_comp = dynamic_cast<PolicyCompiler_ipt*>(compiler);
|
||||||
|
|
||||||
// RuleElementSrv *srvrel=rule->getSrv();
|
// RuleElementSrv *srvrel=rule->getSrv();
|
||||||
|
#ifndef NDEBUG
|
||||||
Service *srv = compiler->getFirstSrv(rule);
|
Service *srv = compiler->getFirstSrv(rule);
|
||||||
assert(srv);
|
assert(srv);
|
||||||
|
#endif
|
||||||
|
|
||||||
string s = ipt_comp->getActionOnReject(rule);
|
string s = ipt_comp->getActionOnReject(rule);
|
||||||
if (!s.empty())
|
if (!s.empty())
|
||||||
|
|||||||
@@ -916,7 +916,9 @@ bool PolicyCompiler_ipt::Logging2::processNext()
|
|||||||
PolicyCompiler_ipt *ipt_comp = dynamic_cast<PolicyCompiler_ipt*>(compiler);
|
PolicyCompiler_ipt *ipt_comp = dynamic_cast<PolicyCompiler_ipt*>(compiler);
|
||||||
PolicyRule *rule = getNext(); if (rule==NULL) return false;
|
PolicyRule *rule = getNext(); if (rule==NULL) return false;
|
||||||
|
|
||||||
|
#ifndef NDEBUG
|
||||||
RuleElementItf *itf_re = rule->getItf(); assert(itf_re!=NULL);
|
RuleElementItf *itf_re = rule->getItf(); assert(itf_re!=NULL);
|
||||||
|
#endif
|
||||||
|
|
||||||
RuleElementSrc *nsrc;
|
RuleElementSrc *nsrc;
|
||||||
RuleElementDst *ndst;
|
RuleElementDst *ndst;
|
||||||
@@ -1976,8 +1978,11 @@ bool PolicyCompiler_ipt::bridgingFw::processNext()
|
|||||||
* this only if the rule is not associated with any bridging
|
* this only if the rule is not associated with any bridging
|
||||||
* interfaces
|
* interfaces
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#ifndef NDEBUG
|
||||||
RuleElementItf *itfre = rule->getItf();
|
RuleElementItf *itfre = rule->getItf();
|
||||||
assert(itfre);
|
assert(itfre);
|
||||||
|
#endif
|
||||||
|
|
||||||
RuleElementItf *itf_re = rule->getItf(); assert(itf_re!=NULL);
|
RuleElementItf *itf_re = rule->getItf(); assert(itf_re!=NULL);
|
||||||
Interface *rule_iface =
|
Interface *rule_iface =
|
||||||
@@ -2190,7 +2195,9 @@ bool PolicyCompiler_ipt::splitIfSrcAny::processNext()
|
|||||||
/* See #2008. It appears "--physdev-out" is not allowed in OUTPUT
|
/* See #2008. It appears "--physdev-out" is not allowed in OUTPUT
|
||||||
* chain.
|
* chain.
|
||||||
*/
|
*/
|
||||||
|
#ifndef NDEBUG
|
||||||
RuleElementItf *itfre = rule->getItf(); assert(itfre);
|
RuleElementItf *itfre = rule->getItf(); assert(itfre);
|
||||||
|
#endif
|
||||||
Interface *itf = compiler->getFirstItf(rule);
|
Interface *itf = compiler->getFirstItf(rule);
|
||||||
|
|
||||||
if (fwopt->getBool("bridging_fw") && itf && itf->isBridgePort())
|
if (fwopt->getBool("bridging_fw") && itf && itf->isBridgePort())
|
||||||
|
|||||||
@@ -511,11 +511,15 @@ bool NATCompiler::ConvertToAtomicForAddresses::processNext()
|
|||||||
|
|
||||||
RuleElementOSrc *osrc=rule->getOSrc(); assert(osrc);
|
RuleElementOSrc *osrc=rule->getOSrc(); assert(osrc);
|
||||||
RuleElementODst *odst=rule->getODst(); assert(odst);
|
RuleElementODst *odst=rule->getODst(); assert(odst);
|
||||||
|
#ifndef NDEBUG
|
||||||
RuleElementOSrv *osrv=rule->getOSrv(); assert(osrv);
|
RuleElementOSrv *osrv=rule->getOSrv(); assert(osrv);
|
||||||
|
#endif
|
||||||
|
|
||||||
RuleElementTSrc *tsrc=rule->getTSrc(); assert(tsrc);
|
RuleElementTSrc *tsrc=rule->getTSrc(); assert(tsrc);
|
||||||
RuleElementTDst *tdst=rule->getTDst(); assert(tdst);
|
RuleElementTDst *tdst=rule->getTDst(); assert(tdst);
|
||||||
|
#ifndef NDEBUG
|
||||||
RuleElementTSrv *tsrv=rule->getTSrv(); assert(tsrv);
|
RuleElementTSrv *tsrv=rule->getTSrv(); assert(tsrv);
|
||||||
|
#endif
|
||||||
|
|
||||||
for (FWObject::iterator i1=osrc->begin(); i1!=osrc->end(); ++i1)
|
for (FWObject::iterator i1=osrc->begin(); i1!=osrc->end(); ++i1)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -99,8 +99,10 @@ void AddressRangeDialog::validate(bool *res)
|
|||||||
|
|
||||||
if (!validateName(this,obj,m_dialog->obj_name->text())) { *res=false; return; }
|
if (!validateName(this,obj,m_dialog->obj_name->text())) { *res=false; return; }
|
||||||
|
|
||||||
|
#ifndef NDEBUG
|
||||||
AddressRange *s = dynamic_cast<AddressRange*>(obj);
|
AddressRange *s = dynamic_cast<AddressRange*>(obj);
|
||||||
assert(s!=NULL);
|
assert(s!=NULL);
|
||||||
|
#endif
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
InetAddr range_start(AF_UNSPEC, m_dialog->rangeStart->text().toLatin1().constData());
|
InetAddr range_start(AF_UNSPEC, m_dialog->rangeStart->text().toLatin1().constData());
|
||||||
|
|||||||
@@ -116,8 +116,11 @@ void AddressTableDialog::updateButtons()
|
|||||||
void AddressTableDialog::validate(bool *res)
|
void AddressTableDialog::validate(bool *res)
|
||||||
{
|
{
|
||||||
*res=true;
|
*res=true;
|
||||||
|
|
||||||
|
#ifndef NDEBUG
|
||||||
AddressTable *s = dynamic_cast<AddressTable*>(obj);
|
AddressTable *s = dynamic_cast<AddressTable*>(obj);
|
||||||
assert(s!=NULL);
|
assert(s!=NULL);
|
||||||
|
#endif
|
||||||
|
|
||||||
if (!validateName(this,obj,m_dialog->obj_name->text())) { *res=false; return; }
|
if (!validateName(this,obj,m_dialog->obj_name->text())) { *res=false; return; }
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -129,8 +129,11 @@ void AttachedNetworksDialog::validate(bool *result)
|
|||||||
if (fwbdebug) qDebug() << "AttachedNetworksDialog::validate";
|
if (fwbdebug) qDebug() << "AttachedNetworksDialog::validate";
|
||||||
|
|
||||||
*result = true;
|
*result = true;
|
||||||
|
|
||||||
|
#ifndef NDEBUG
|
||||||
AttachedNetworks *s = dynamic_cast<AttachedNetworks*>(obj);
|
AttachedNetworks *s = dynamic_cast<AttachedNetworks*>(obj);
|
||||||
assert(s!=NULL);
|
assert(s!=NULL);
|
||||||
|
#endif
|
||||||
|
|
||||||
if (!validateName(this, obj, m_dialog->obj_name->text()))
|
if (!validateName(this, obj, m_dialog->obj_name->text()))
|
||||||
{
|
{
|
||||||
@@ -144,8 +147,10 @@ void AttachedNetworksDialog::applyChanges()
|
|||||||
std::auto_ptr<FWCmdChange> cmd( new FWCmdChange(m_project, obj));
|
std::auto_ptr<FWCmdChange> cmd( new FWCmdChange(m_project, obj));
|
||||||
FWObject* new_state = cmd->getNewState();
|
FWObject* new_state = cmd->getNewState();
|
||||||
|
|
||||||
|
#ifndef NDEBUG
|
||||||
AttachedNetworks *s = dynamic_cast<AttachedNetworks*>(new_state);
|
AttachedNetworks *s = dynamic_cast<AttachedNetworks*>(new_state);
|
||||||
assert(s!=NULL);
|
assert(s!=NULL);
|
||||||
|
#endif
|
||||||
|
|
||||||
string oldname = obj->getName();
|
string oldname = obj->getName();
|
||||||
new_state->setName(string(m_dialog->obj_name->text().toUtf8().constData()));
|
new_state->setName(string(m_dialog->obj_name->text().toUtf8().constData()));
|
||||||
|
|||||||
@@ -279,8 +279,10 @@ void ClusterGroupDialog::applyChanges()
|
|||||||
std::auto_ptr<FWCmdChange> cmd( new FWCmdChange(m_project, obj));
|
std::auto_ptr<FWCmdChange> cmd( new FWCmdChange(m_project, obj));
|
||||||
FWObject* new_state = cmd->getNewState();
|
FWObject* new_state = cmd->getNewState();
|
||||||
|
|
||||||
|
#ifndef NDEBUG
|
||||||
ClusterGroup *g = dynamic_cast<ClusterGroup*>(new_state);
|
ClusterGroup *g = dynamic_cast<ClusterGroup*>(new_state);
|
||||||
assert(g != NULL);
|
assert(g != NULL);
|
||||||
|
#endif
|
||||||
|
|
||||||
QString oldname = obj->getName().c_str();
|
QString oldname = obj->getName().c_str();
|
||||||
new_state->setName(string(m_dialog->obj_name->text().toUtf8().constData()));
|
new_state->setName(string(m_dialog->obj_name->text().toUtf8().constData()));
|
||||||
|
|||||||
@@ -105,9 +105,10 @@ void DNSNameDialog::loadFWObject(FWObject *o)
|
|||||||
void DNSNameDialog::validate(bool *res)
|
void DNSNameDialog::validate(bool *res)
|
||||||
{
|
{
|
||||||
*res=true;
|
*res=true;
|
||||||
|
#ifndef NDEBUG
|
||||||
DNSName *s = dynamic_cast<DNSName*>(obj);
|
DNSName *s = dynamic_cast<DNSName*>(obj);
|
||||||
assert(s!=NULL);
|
assert(s!=NULL);
|
||||||
|
#endif
|
||||||
if (!validateName(this,obj,m_dialog->obj_name->text())) { *res=false; return; }
|
if (!validateName(this,obj,m_dialog->obj_name->text())) { *res=false; return; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -106,8 +106,10 @@ void FirewallDialog::loadFWObject(FWObject *o)
|
|||||||
/* ---------------- */
|
/* ---------------- */
|
||||||
updateTimeStamps();
|
updateTimeStamps();
|
||||||
|
|
||||||
|
#ifndef NDEBUG
|
||||||
Management *mgmt=s->getManagementObject();
|
Management *mgmt=s->getManagementObject();
|
||||||
assert(mgmt!=NULL);
|
assert(mgmt!=NULL);
|
||||||
|
#endif
|
||||||
|
|
||||||
// FWOptions *opt =s->getOptionsObject();
|
// FWOptions *opt =s->getOptionsObject();
|
||||||
|
|
||||||
@@ -309,8 +311,11 @@ void FirewallDialog::applyChanges()
|
|||||||
FWObject* new_state = cmd->getNewState();
|
FWObject* new_state = cmd->getNewState();
|
||||||
|
|
||||||
Firewall *s = dynamic_cast<Firewall*>(new_state);
|
Firewall *s = dynamic_cast<Firewall*>(new_state);
|
||||||
|
|
||||||
|
#ifndef NDEBUG
|
||||||
Management *mgmt = s->getManagementObject();
|
Management *mgmt = s->getManagementObject();
|
||||||
assert(mgmt!=NULL);
|
assert(mgmt!=NULL);
|
||||||
|
#endif
|
||||||
|
|
||||||
string old_name = obj->getName();
|
string old_name = obj->getName();
|
||||||
string new_name = string(m_dialog->obj_name->text().toUtf8().constData());
|
string new_name = string(m_dialog->obj_name->text().toUtf8().constData());
|
||||||
|
|||||||
@@ -76,8 +76,10 @@ void HostDialog::loadFWObject(FWObject *o)
|
|||||||
|
|
||||||
init = true;
|
init = true;
|
||||||
|
|
||||||
|
#ifndef NDEBUG
|
||||||
Management *mgmt=s->getManagementObject();
|
Management *mgmt=s->getManagementObject();
|
||||||
assert(mgmt!=NULL);
|
assert(mgmt!=NULL);
|
||||||
|
#endif
|
||||||
|
|
||||||
FWOptions *opt =s->getOptionsObject();
|
FWOptions *opt =s->getOptionsObject();
|
||||||
|
|
||||||
@@ -148,8 +150,10 @@ void HostDialog::applyChanges()
|
|||||||
Host *s = dynamic_cast<Host*>(new_state);
|
Host *s = dynamic_cast<Host*>(new_state);
|
||||||
assert(s!=NULL);
|
assert(s!=NULL);
|
||||||
|
|
||||||
|
#ifndef NDEBUG
|
||||||
Management *mgmt = s->getManagementObject();
|
Management *mgmt = s->getManagementObject();
|
||||||
assert(mgmt!=NULL);
|
assert(mgmt!=NULL);
|
||||||
|
#endif
|
||||||
|
|
||||||
FWOptions *opt =s->getOptionsObject();
|
FWOptions *opt =s->getOptionsObject();
|
||||||
|
|
||||||
|
|||||||
@@ -137,8 +137,11 @@ void IPv4Dialog::validate(bool *result)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef NDEBUG
|
||||||
IPv4 *s = dynamic_cast<IPv4*>(obj);
|
IPv4 *s = dynamic_cast<IPv4*>(obj);
|
||||||
assert(s!=NULL);
|
assert(s!=NULL);
|
||||||
|
#endif
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
InetAddr( m_dialog->address->text().trimmed().toLatin1().constData() );
|
InetAddr( m_dialog->address->text().trimmed().toLatin1().constData() );
|
||||||
|
|||||||
@@ -140,8 +140,11 @@ void IPv6Dialog::validate(bool *res)
|
|||||||
|
|
||||||
if (!validateName(this,obj,m_dialog->obj_name->text())) { *res=false; return; }
|
if (!validateName(this,obj,m_dialog->obj_name->text())) { *res=false; return; }
|
||||||
|
|
||||||
|
#ifndef NDEBUG
|
||||||
IPv6 *s = dynamic_cast<IPv6*>(obj);
|
IPv6 *s = dynamic_cast<IPv6*>(obj);
|
||||||
assert(s!=NULL);
|
assert(s!=NULL);
|
||||||
|
#endif
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
InetAddr(AF_INET6, m_dialog->address->text().trimmed().toLatin1().constData() );
|
InetAddr(AF_INET6, m_dialog->address->text().trimmed().toLatin1().constData() );
|
||||||
|
|||||||
@@ -128,8 +128,11 @@ void NetworkDialog::validate(bool *result)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef NDEBUG
|
||||||
Network *s = dynamic_cast<Network*>(obj);
|
Network *s = dynamic_cast<Network*>(obj);
|
||||||
assert(s!=NULL);
|
assert(s!=NULL);
|
||||||
|
#endif
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
InetAddr( m_dialog->address->text().toStdString() );
|
InetAddr( m_dialog->address->text().toStdString() );
|
||||||
|
|||||||
@@ -111,8 +111,11 @@ void NetworkDialogIPv6::validate(bool *res)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef NDEBUG
|
||||||
NetworkIPv6 *s = dynamic_cast<NetworkIPv6*>(obj);
|
NetworkIPv6 *s = dynamic_cast<NetworkIPv6*>(obj);
|
||||||
assert(s != NULL);
|
assert(s != NULL);
|
||||||
|
#endif
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
InetAddr(AF_INET6, m_dialog->address->text().toStdString() );
|
InetAddr(AF_INET6, m_dialog->address->text().toStdString() );
|
||||||
|
|||||||
@@ -511,8 +511,11 @@ FWObject* ObjectManipulator::newFirewall(QUndoCommand* macro)
|
|||||||
FWObject *parent =
|
FWObject *parent =
|
||||||
FWBTree().getStandardSlotForObject(getCurrentLib(), Firewall::TYPENAME);
|
FWBTree().getStandardSlotForObject(getCurrentLib(), Firewall::TYPENAME);
|
||||||
assert(parent);
|
assert(parent);
|
||||||
|
|
||||||
|
#ifndef NDEBUG
|
||||||
ObjectTreeViewItem* parent_item = allItems[parent];
|
ObjectTreeViewItem* parent_item = allItems[parent];
|
||||||
assert(parent_item);
|
assert(parent_item);
|
||||||
|
#endif
|
||||||
|
|
||||||
newFirewallDialog *nfd = new newFirewallDialog(this, parent);
|
newFirewallDialog *nfd = new newFirewallDialog(this, parent);
|
||||||
if (mw->isEditorVisible()) mw->hideEditor();
|
if (mw->isEditorVisible()) mw->hideEditor();
|
||||||
@@ -540,8 +543,11 @@ FWObject* ObjectManipulator::newCluster(QUndoCommand* macro, bool fromSelected)
|
|||||||
FWObject *parent =
|
FWObject *parent =
|
||||||
FWBTree().getStandardSlotForObject(getCurrentLib(), Cluster::TYPENAME);
|
FWBTree().getStandardSlotForObject(getCurrentLib(), Cluster::TYPENAME);
|
||||||
assert(parent);
|
assert(parent);
|
||||||
|
|
||||||
|
#ifndef NDEBUG
|
||||||
ObjectTreeViewItem* parent_item = allItems[parent];
|
ObjectTreeViewItem* parent_item = allItems[parent];
|
||||||
assert(parent_item);
|
assert(parent_item);
|
||||||
|
#endif
|
||||||
|
|
||||||
newClusterDialog *ncd = new newClusterDialog(this, parent);
|
newClusterDialog *ncd = new newClusterDialog(this, parent);
|
||||||
if (mw->isEditorVisible()) mw->hideEditor();
|
if (mw->isEditorVisible()) mw->hideEditor();
|
||||||
|
|||||||
@@ -91,8 +91,10 @@ void ObjectManipulator::autoRenameChildren(FWObject *obj,
|
|||||||
|
|
||||||
if (oldName == QString::fromUtf8(obj->getName().c_str())) return;
|
if (oldName == QString::fromUtf8(obj->getName().c_str())) return;
|
||||||
|
|
||||||
|
#ifndef NDEBUG
|
||||||
QTreeWidgetItem *itm = allItems[obj];
|
QTreeWidgetItem *itm = allItems[obj];
|
||||||
assert(itm!=NULL);
|
assert(itm!=NULL);
|
||||||
|
#endif
|
||||||
|
|
||||||
if ((QString::fromUtf8(obj->getName().c_str())!=oldName) &&
|
if ((QString::fromUtf8(obj->getName().c_str())!=oldName) &&
|
||||||
(Host::isA(obj) || Firewall::cast(obj)!=NULL || Interface::isA(obj)))
|
(Host::isA(obj) || Firewall::cast(obj)!=NULL || Interface::isA(obj)))
|
||||||
|
|||||||
@@ -98,9 +98,10 @@ void TagServiceDialog::loadFWObject(FWObject *o)
|
|||||||
void TagServiceDialog::validate(bool *res)
|
void TagServiceDialog::validate(bool *res)
|
||||||
{
|
{
|
||||||
*res=true;
|
*res=true;
|
||||||
|
#ifndef NDEBUG
|
||||||
TagService *s = dynamic_cast<TagService*>(obj);
|
TagService *s = dynamic_cast<TagService*>(obj);
|
||||||
assert(s!=NULL);
|
assert(s!=NULL);
|
||||||
|
#endif
|
||||||
if (!validateName(this,obj,m_dialog->obj_name->text())) { *res=false; return; }
|
if (!validateName(this,obj,m_dialog->obj_name->text())) { *res=false; return; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -94,8 +94,10 @@ void UserDialog::validate(bool *res)
|
|||||||
|
|
||||||
if (!validateName(this,obj,m_dialog->obj_name->text())) { *res=false; return; }
|
if (!validateName(this,obj,m_dialog->obj_name->text())) { *res=false; return; }
|
||||||
|
|
||||||
|
#ifndef NDEBUG
|
||||||
UserService *s = dynamic_cast<UserService*>(obj);
|
UserService *s = dynamic_cast<UserService*>(obj);
|
||||||
assert(s!=NULL);
|
assert(s!=NULL);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -63,8 +63,10 @@ freebsdAdvancedDialog::freebsdAdvancedDialog(QWidget *parent,FWObject *o)
|
|||||||
FWOptions *fwopt=(Firewall::cast(obj))->getOptionsObject();
|
FWOptions *fwopt=(Firewall::cast(obj))->getOptionsObject();
|
||||||
assert(fwopt!=NULL);
|
assert(fwopt!=NULL);
|
||||||
|
|
||||||
|
#ifndef NDEBUG
|
||||||
Management *mgmt=(Firewall::cast(obj))->getManagementObject();
|
Management *mgmt=(Firewall::cast(obj))->getManagementObject();
|
||||||
assert(mgmt!=NULL);
|
assert(mgmt!=NULL);
|
||||||
|
#endif
|
||||||
|
|
||||||
QStringList threeStateMapping;
|
QStringList threeStateMapping;
|
||||||
|
|
||||||
|
|||||||
@@ -65,8 +65,10 @@ iosAdvancedDialog::iosAdvancedDialog(QWidget *parent,FWObject *o)
|
|||||||
FWOptions *fwoptions=(Firewall::cast(obj))->getOptionsObject();
|
FWOptions *fwoptions=(Firewall::cast(obj))->getOptionsObject();
|
||||||
assert(fwoptions!=NULL);
|
assert(fwoptions!=NULL);
|
||||||
|
|
||||||
|
#ifndef NDEBUG
|
||||||
Management *mgmt=(Firewall::cast(obj))->getManagementObject();
|
Management *mgmt=(Firewall::cast(obj))->getManagementObject();
|
||||||
assert(mgmt!=NULL);
|
assert(mgmt!=NULL);
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Page "General" */
|
/* Page "General" */
|
||||||
data.registerOption( m_dialog->ios_set_host_name , fwoptions, "ios_set_host_name" );
|
data.registerOption( m_dialog->ios_set_host_name , fwoptions, "ios_set_host_name" );
|
||||||
|
|||||||
@@ -70,8 +70,10 @@ ipcoposAdvancedDialog::ipcoposAdvancedDialog(QWidget *parent,FWObject *o)
|
|||||||
FWOptions *fwopt=(Firewall::cast(obj))->getOptionsObject();
|
FWOptions *fwopt=(Firewall::cast(obj))->getOptionsObject();
|
||||||
assert(fwopt!=NULL);
|
assert(fwopt!=NULL);
|
||||||
|
|
||||||
|
#ifndef NDEBUG
|
||||||
Management *mgmt=(Firewall::cast(obj))->getManagementObject();
|
Management *mgmt=(Firewall::cast(obj))->getManagementObject();
|
||||||
assert(mgmt!=NULL);
|
assert(mgmt!=NULL);
|
||||||
|
#endif
|
||||||
|
|
||||||
QStringList threeStateMapping;
|
QStringList threeStateMapping;
|
||||||
|
|
||||||
|
|||||||
@@ -65,8 +65,10 @@ junosAdvancedDialog::junosAdvancedDialog(QWidget *parent,FWObject *o)
|
|||||||
FWOptions *fwoptions=(Firewall::cast(obj))->getOptionsObject();
|
FWOptions *fwoptions=(Firewall::cast(obj))->getOptionsObject();
|
||||||
assert(fwoptions!=NULL);
|
assert(fwoptions!=NULL);
|
||||||
|
|
||||||
|
#ifndef NDEBUG
|
||||||
Management *mgmt=(Firewall::cast(obj))->getManagementObject();
|
Management *mgmt=(Firewall::cast(obj))->getManagementObject();
|
||||||
assert(mgmt!=NULL);
|
assert(mgmt!=NULL);
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Page "General" */
|
/* Page "General" */
|
||||||
data.registerOption( m_dialog->junos_set_host_name , fwoptions, "junos_set_host_name" );
|
data.registerOption( m_dialog->junos_set_host_name , fwoptions, "junos_set_host_name" );
|
||||||
|
|||||||
@@ -64,8 +64,11 @@ linksysAdvancedDialog::linksysAdvancedDialog(QWidget *parent,FWObject *o)
|
|||||||
FWOptions *fwopt=(Firewall::cast(obj))->getOptionsObject();
|
FWOptions *fwopt=(Firewall::cast(obj))->getOptionsObject();
|
||||||
assert(fwopt!=NULL);
|
assert(fwopt!=NULL);
|
||||||
|
|
||||||
|
#ifndef NDEBUG
|
||||||
Management *mgmt=(Firewall::cast(obj))->getManagementObject();
|
Management *mgmt=(Firewall::cast(obj))->getManagementObject();
|
||||||
assert(mgmt!=NULL);
|
assert(mgmt!=NULL);
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* since v2.0.3 we do not need to know shell prompt on linksys. Will
|
* since v2.0.3 we do not need to know shell prompt on linksys. Will
|
||||||
* remove the page completely when code becomes stable.
|
* remove the page completely when code becomes stable.
|
||||||
@@ -157,8 +160,10 @@ void linksysAdvancedDialog::reject()
|
|||||||
|
|
||||||
void linksysAdvancedDialog::setDefaultPrompts()
|
void linksysAdvancedDialog::setDefaultPrompts()
|
||||||
{
|
{
|
||||||
|
#ifndef NDEBUG
|
||||||
FWOptions *fwopt=(Firewall::cast(obj))->getOptionsObject();
|
FWOptions *fwopt=(Firewall::cast(obj))->getOptionsObject();
|
||||||
assert(fwopt!=NULL);
|
assert(fwopt!=NULL);
|
||||||
|
#endif
|
||||||
m_dialog->linksys_prompt1->setText(
|
m_dialog->linksys_prompt1->setText(
|
||||||
Resources::getTargetOptionStr("sveasoft","default/prompt1").c_str() );
|
Resources::getTargetOptionStr("sveasoft","default/prompt1").c_str() );
|
||||||
m_dialog->linksys_prompt2->setText(
|
m_dialog->linksys_prompt2->setText(
|
||||||
|
|||||||
@@ -71,8 +71,10 @@ linux24AdvancedDialog::linux24AdvancedDialog(QWidget *parent,FWObject *o)
|
|||||||
FWOptions *fwopt=(Firewall::cast(obj))->getOptionsObject();
|
FWOptions *fwopt=(Firewall::cast(obj))->getOptionsObject();
|
||||||
assert(fwopt!=NULL);
|
assert(fwopt!=NULL);
|
||||||
|
|
||||||
|
#ifndef NDEBUG
|
||||||
Management *mgmt=(Firewall::cast(obj))->getManagementObject();
|
Management *mgmt=(Firewall::cast(obj))->getManagementObject();
|
||||||
assert(mgmt!=NULL);
|
assert(mgmt!=NULL);
|
||||||
|
#endif
|
||||||
|
|
||||||
QStringList threeStateMapping;
|
QStringList threeStateMapping;
|
||||||
|
|
||||||
@@ -208,8 +210,10 @@ void linux24AdvancedDialog::accept()
|
|||||||
FWOptions* fwoptions = Firewall::cast(new_state)->getOptionsObject();
|
FWOptions* fwoptions = Firewall::cast(new_state)->getOptionsObject();
|
||||||
assert(fwoptions!=NULL);
|
assert(fwoptions!=NULL);
|
||||||
|
|
||||||
|
#ifndef NDEBUG
|
||||||
Management *mgmt = (Firewall::cast(new_state))->getManagementObject();
|
Management *mgmt = (Firewall::cast(new_state))->getManagementObject();
|
||||||
assert(mgmt!=NULL);
|
assert(mgmt!=NULL);
|
||||||
|
#endif
|
||||||
|
|
||||||
data.saveAll(fwoptions);
|
data.saveAll(fwoptions);
|
||||||
|
|
||||||
|
|||||||
@@ -63,8 +63,10 @@ macosxAdvancedDialog::macosxAdvancedDialog(QWidget *parent,FWObject *o)
|
|||||||
FWOptions *fwopt=(Firewall::cast(obj))->getOptionsObject();
|
FWOptions *fwopt=(Firewall::cast(obj))->getOptionsObject();
|
||||||
assert(fwopt!=NULL);
|
assert(fwopt!=NULL);
|
||||||
|
|
||||||
|
#ifndef NDEBUG
|
||||||
Management *mgmt=(Firewall::cast(obj))->getManagementObject();
|
Management *mgmt=(Firewall::cast(obj))->getManagementObject();
|
||||||
assert(mgmt!=NULL);
|
assert(mgmt!=NULL);
|
||||||
|
#endif
|
||||||
|
|
||||||
QStringList threeStateMapping;
|
QStringList threeStateMapping;
|
||||||
|
|
||||||
|
|||||||
@@ -65,8 +65,10 @@ nxosAdvancedDialog::nxosAdvancedDialog(QWidget *parent,FWObject *o)
|
|||||||
FWOptions *fwoptions=(Firewall::cast(obj))->getOptionsObject();
|
FWOptions *fwoptions=(Firewall::cast(obj))->getOptionsObject();
|
||||||
assert(fwoptions!=NULL);
|
assert(fwoptions!=NULL);
|
||||||
|
|
||||||
|
#ifndef NDEBUG
|
||||||
Management *mgmt=(Firewall::cast(obj))->getManagementObject();
|
Management *mgmt=(Firewall::cast(obj))->getManagementObject();
|
||||||
assert(mgmt!=NULL);
|
assert(mgmt!=NULL);
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Page "General" */
|
/* Page "General" */
|
||||||
data.registerOption( m_dialog->nxos_set_host_name , fwoptions, "nxos_set_host_name" );
|
data.registerOption( m_dialog->nxos_set_host_name , fwoptions, "nxos_set_host_name" );
|
||||||
|
|||||||
@@ -64,8 +64,10 @@ openbsdAdvancedDialog::openbsdAdvancedDialog(QWidget *parent,FWObject *o)
|
|||||||
FWOptions *fwopt=(Firewall::cast(obj))->getOptionsObject();
|
FWOptions *fwopt=(Firewall::cast(obj))->getOptionsObject();
|
||||||
assert(fwopt!=NULL);
|
assert(fwopt!=NULL);
|
||||||
|
|
||||||
|
#ifndef NDEBUG
|
||||||
Management *mgmt=(Firewall::cast(obj))->getManagementObject();
|
Management *mgmt=(Firewall::cast(obj))->getManagementObject();
|
||||||
assert(mgmt!=NULL);
|
assert(mgmt!=NULL);
|
||||||
|
#endif
|
||||||
|
|
||||||
QStringList threeStateMapping;
|
QStringList threeStateMapping;
|
||||||
|
|
||||||
@@ -120,8 +122,10 @@ void openbsdAdvancedDialog::accept()
|
|||||||
FWOptions* fwoptions = Firewall::cast(new_state)->getOptionsObject();
|
FWOptions* fwoptions = Firewall::cast(new_state)->getOptionsObject();
|
||||||
assert(fwoptions!=NULL);
|
assert(fwoptions!=NULL);
|
||||||
|
|
||||||
|
#ifndef NDEBUG
|
||||||
Management *mgmt = (Firewall::cast(new_state))->getManagementObject();
|
Management *mgmt = (Firewall::cast(new_state))->getManagementObject();
|
||||||
assert(mgmt!=NULL);
|
assert(mgmt!=NULL);
|
||||||
|
#endif
|
||||||
|
|
||||||
data.saveAll(fwoptions);
|
data.saveAll(fwoptions);
|
||||||
|
|
||||||
|
|||||||
@@ -910,9 +910,10 @@ void pixAdvancedDialog::editEpilog()
|
|||||||
void pixAdvancedDialog::setDefaultTimeoutValue(const QString &option)
|
void pixAdvancedDialog::setDefaultTimeoutValue(const QString &option)
|
||||||
{
|
{
|
||||||
string platform = obj->getStr("platform"); // could be 'pix' or 'fwsm'
|
string platform = obj->getStr("platform"); // could be 'pix' or 'fwsm'
|
||||||
|
#ifndef NDEBUG
|
||||||
FWOptions *fwoptions=(Firewall::cast(obj))->getOptionsObject();
|
FWOptions *fwoptions=(Firewall::cast(obj))->getOptionsObject();
|
||||||
assert(fwoptions!=NULL);
|
assert(fwoptions!=NULL);
|
||||||
|
#endif
|
||||||
string vers="version_"+obj->getStr("version");
|
string vers="version_"+obj->getStr("version");
|
||||||
|
|
||||||
if (option=="uauth_abs" || option=="uauth_inact")
|
if (option=="uauth_abs" || option=="uauth_inact")
|
||||||
@@ -937,9 +938,10 @@ void pixAdvancedDialog::setDefaultTimeoutValue(const QString &option)
|
|||||||
|
|
||||||
void pixAdvancedDialog::defaultTimeouts()
|
void pixAdvancedDialog::defaultTimeouts()
|
||||||
{
|
{
|
||||||
|
#ifndef NDEBUG
|
||||||
FWOptions *fwoptions=(Firewall::cast(obj))->getOptionsObject();
|
FWOptions *fwoptions=(Firewall::cast(obj))->getOptionsObject();
|
||||||
assert(fwoptions!=NULL);
|
assert(fwoptions!=NULL);
|
||||||
|
#endif
|
||||||
string vers="version_"+obj->getStr("version");
|
string vers="version_"+obj->getStr("version");
|
||||||
|
|
||||||
setDefaultTimeoutValue("xlate_hh" );
|
setDefaultTimeoutValue("xlate_hh" );
|
||||||
|
|||||||
@@ -66,8 +66,10 @@ pixosAdvancedDialog::pixosAdvancedDialog(QWidget *parent,FWObject *o)
|
|||||||
FWOptions *fwoptions=(Firewall::cast(obj))->getOptionsObject();
|
FWOptions *fwoptions=(Firewall::cast(obj))->getOptionsObject();
|
||||||
assert(fwoptions!=NULL);
|
assert(fwoptions!=NULL);
|
||||||
|
|
||||||
|
#ifndef NDEBUG
|
||||||
Management *mgmt=(Firewall::cast(obj))->getManagementObject();
|
Management *mgmt=(Firewall::cast(obj))->getManagementObject();
|
||||||
assert(mgmt!=NULL);
|
assert(mgmt!=NULL);
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Page "General" */
|
/* Page "General" */
|
||||||
data.registerOption(
|
data.registerOption(
|
||||||
|
|||||||
@@ -63,8 +63,10 @@ solarisAdvancedDialog::solarisAdvancedDialog(QWidget *parent,FWObject *o)
|
|||||||
FWOptions *fwopt=(Firewall::cast(obj))->getOptionsObject();
|
FWOptions *fwopt=(Firewall::cast(obj))->getOptionsObject();
|
||||||
assert(fwopt!=NULL);
|
assert(fwopt!=NULL);
|
||||||
|
|
||||||
|
#ifndef NDEBUG
|
||||||
Management *mgmt=(Firewall::cast(obj))->getManagementObject();
|
Management *mgmt=(Firewall::cast(obj))->getManagementObject();
|
||||||
assert(mgmt!=NULL);
|
assert(mgmt!=NULL);
|
||||||
|
#endif
|
||||||
|
|
||||||
QStringList threeStateMapping;
|
QStringList threeStateMapping;
|
||||||
|
|
||||||
|
|||||||
@@ -73,7 +73,9 @@ bool NATCompiler_ipf::VerifyRules::processNext()
|
|||||||
RuleElementOSrv *osrv=rule->getOSrv(); assert(osrv);
|
RuleElementOSrv *osrv=rule->getOSrv(); assert(osrv);
|
||||||
|
|
||||||
RuleElementTSrc *tsrc=rule->getTSrc(); assert(tsrc);
|
RuleElementTSrc *tsrc=rule->getTSrc(); assert(tsrc);
|
||||||
|
#ifndef NDEBUG
|
||||||
RuleElementTDst *tdst=rule->getTDst(); assert(tdst);
|
RuleElementTDst *tdst=rule->getTDst(); assert(tdst);
|
||||||
|
#endif
|
||||||
RuleElementTSrv *tsrv=rule->getTSrv(); assert(tsrv);
|
RuleElementTSrv *tsrv=rule->getTSrv(); assert(tsrv);
|
||||||
|
|
||||||
if (rule->getRuleType()==NATRule::DNAT && odst->size()!=1)
|
if (rule->getRuleType()==NATRule::DNAT && odst->size()!=1)
|
||||||
|
|||||||
@@ -385,8 +385,10 @@ bool NATCompiler_pf::VerifyRules::processNext()
|
|||||||
|
|
||||||
string version = compiler->fw->getStr("version");
|
string version = compiler->fw->getStr("version");
|
||||||
|
|
||||||
|
#ifndef NDEBUG
|
||||||
RuleElementOSrc *osrc=rule->getOSrc(); assert(osrc);
|
RuleElementOSrc *osrc=rule->getOSrc(); assert(osrc);
|
||||||
RuleElementODst *odst=rule->getODst(); assert(odst);
|
RuleElementODst *odst=rule->getODst(); assert(odst);
|
||||||
|
#endif
|
||||||
RuleElementOSrv *osrv=rule->getOSrv(); assert(osrv);
|
RuleElementOSrv *osrv=rule->getOSrv(); assert(osrv);
|
||||||
|
|
||||||
RuleElementTSrc *tsrc=rule->getTSrc(); assert(tsrc);
|
RuleElementTSrc *tsrc=rule->getTSrc(); assert(tsrc);
|
||||||
|
|||||||
@@ -317,9 +317,11 @@ bool PolicyCompiler_ipf::PrintRule::processNext()
|
|||||||
compiler->output << compiler->printComment(rule, current_rule_label, "#");
|
compiler->output << compiler->printComment(rule, current_rule_label, "#");
|
||||||
|
|
||||||
RuleElementSrc *srcrel=rule->getSrc();
|
RuleElementSrc *srcrel=rule->getSrc();
|
||||||
|
#ifndef NDEBUG
|
||||||
Address *src =compiler->getFirstSrc(rule); assert(src);
|
Address *src =compiler->getFirstSrc(rule); assert(src);
|
||||||
RuleElementDst *dstrel=rule->getDst();
|
|
||||||
Address *dst =compiler->getFirstDst(rule); assert(dst);
|
Address *dst =compiler->getFirstDst(rule); assert(dst);
|
||||||
|
#endif
|
||||||
|
RuleElementDst *dstrel=rule->getDst();
|
||||||
RuleElementSrv *srvrel=rule->getSrv();
|
RuleElementSrv *srvrel=rule->getSrv();
|
||||||
Service *srv =compiler->getFirstSrv(rule); assert(srv);
|
Service *srv =compiler->getFirstSrv(rule); assert(srv);
|
||||||
|
|
||||||
|
|||||||
@@ -515,9 +515,11 @@ bool PolicyCompiler_ipfw::PrintRule::processNext()
|
|||||||
compiler->output << compiler->printComment(rule, current_rule_label, "#");
|
compiler->output << compiler->printComment(rule, current_rule_label, "#");
|
||||||
|
|
||||||
RuleElementSrc *srcrel=rule->getSrc();
|
RuleElementSrc *srcrel=rule->getSrc();
|
||||||
|
#ifndef NDEBUG
|
||||||
Address *src =compiler->getFirstSrc(rule); assert(src);
|
Address *src =compiler->getFirstSrc(rule); assert(src);
|
||||||
RuleElementDst *dstrel=rule->getDst();
|
|
||||||
Address *dst =compiler->getFirstDst(rule); assert(dst);
|
Address *dst =compiler->getFirstDst(rule); assert(dst);
|
||||||
|
#endif
|
||||||
|
RuleElementDst *dstrel=rule->getDst();
|
||||||
RuleElementSrv *srvrel=rule->getSrv();
|
RuleElementSrv *srvrel=rule->getSrv();
|
||||||
Service *srv =compiler->getFirstSrv(rule); assert(srv);
|
Service *srv =compiler->getFirstSrv(rule); assert(srv);
|
||||||
|
|
||||||
|
|||||||
@@ -70,7 +70,9 @@ using namespace std;
|
|||||||
void PolicyCompiler_pf::PrintRule::_printAction(PolicyRule *rule)
|
void PolicyCompiler_pf::PrintRule::_printAction(PolicyRule *rule)
|
||||||
{
|
{
|
||||||
FWOptions *ruleopt = rule->getOptionsObject();
|
FWOptions *ruleopt = rule->getOptionsObject();
|
||||||
|
#ifndef NDEBUG
|
||||||
Service *srv = compiler->getFirstSrv(rule); assert(srv);
|
Service *srv = compiler->getFirstSrv(rule); assert(srv);
|
||||||
|
#endif
|
||||||
string version = compiler->fw->getStr("version");
|
string version = compiler->fw->getStr("version");
|
||||||
|
|
||||||
switch (rule->getAction())
|
switch (rule->getAction())
|
||||||
|
|||||||
Reference in New Issue
Block a user