Actiondialog for action Branch finds ruleset using getBranch()

This commit is contained in:
Vadim Kurland
2008-05-31 19:09:09 +00:00
parent 0e208db731
commit ea8b6b1292
2 changed files with 8 additions and 15 deletions
+5 -12
View File
@@ -412,24 +412,17 @@ void ActionsDialog::setRule(PolicyRule *r )
else if (editor=="BranchChain")
{
w=m_dialog->BranchChainPage;
std::string id = ropt->getStr("branch_id");
FWObject * o = rule->getRoot()->getById(id,true);
if (o!=NULL)
{
BranchChainArea->setObject(o);
}
RuleSet *ruleset = r->getBranch();
if (ruleset!=NULL) BranchChainArea->setObject(ruleset);
//data.registerOption ( m_dialog->branchChainName , ropt , "branch_name" );
data.registerOption ( m_dialog->ipt_branch_in_mangle, ropt , "ipt_branch_in_mangle" );
}
else if (editor=="BranchAnchor")
{
w=m_dialog->BranchAnchorPage;
std::string id = ropt->getStr("branch_id");
FWObject * o = rule->getRoot()->getById(id,true);
if (o!=NULL)
{
BranchAnchorArea->setObject(o);
}
RuleSet *ruleset = r->getBranch();
if (ruleset!=NULL) BranchChainArea->setObject(ruleset);
//int idx = ropt->getInt("branch_id");
//data.registerOption ( m_dialog->branchAnchorName , ropt , "branch_name" );
+3 -3
View File
@@ -349,9 +349,9 @@ bool PolicyCompiler_pf::fillDirection::processNext()
{
rule->setDirection( PolicyRule::Both );
Address *src=compiler->getFirstSrc(rule);
Address *dst=compiler->getFirstDst(rule);
string fwid=compiler->getFwId();
Address *src = compiler->getFirstSrc(rule);
Address *dst = compiler->getFirstDst(rule);
string fwid = compiler->getFwId();
if (src==NULL || dst==NULL)
compiler->abort("Broken src or dst in rule "+rule->getLabel());