mirror of
https://github.com/fwbuilder/fwbuilder
synced 2026-09-11 07:31:25 +02:00
Actiondialog for action Branch finds ruleset using getBranch()
This commit is contained in:
@@ -412,24 +412,17 @@ void ActionsDialog::setRule(PolicyRule *r )
|
|||||||
else if (editor=="BranchChain")
|
else if (editor=="BranchChain")
|
||||||
{
|
{
|
||||||
w=m_dialog->BranchChainPage;
|
w=m_dialog->BranchChainPage;
|
||||||
std::string id = ropt->getStr("branch_id");
|
RuleSet *ruleset = r->getBranch();
|
||||||
FWObject * o = rule->getRoot()->getById(id,true);
|
if (ruleset!=NULL) BranchChainArea->setObject(ruleset);
|
||||||
if (o!=NULL)
|
|
||||||
{
|
|
||||||
BranchChainArea->setObject(o);
|
|
||||||
}
|
|
||||||
//data.registerOption ( m_dialog->branchChainName , ropt , "branch_name" );
|
//data.registerOption ( m_dialog->branchChainName , ropt , "branch_name" );
|
||||||
data.registerOption ( m_dialog->ipt_branch_in_mangle, ropt , "ipt_branch_in_mangle" );
|
data.registerOption ( m_dialog->ipt_branch_in_mangle, ropt , "ipt_branch_in_mangle" );
|
||||||
}
|
}
|
||||||
else if (editor=="BranchAnchor")
|
else if (editor=="BranchAnchor")
|
||||||
{
|
{
|
||||||
w=m_dialog->BranchAnchorPage;
|
w=m_dialog->BranchAnchorPage;
|
||||||
std::string id = ropt->getStr("branch_id");
|
RuleSet *ruleset = r->getBranch();
|
||||||
FWObject * o = rule->getRoot()->getById(id,true);
|
if (ruleset!=NULL) BranchChainArea->setObject(ruleset);
|
||||||
if (o!=NULL)
|
|
||||||
{
|
|
||||||
BranchAnchorArea->setObject(o);
|
|
||||||
}
|
|
||||||
|
|
||||||
//int idx = ropt->getInt("branch_id");
|
//int idx = ropt->getInt("branch_id");
|
||||||
//data.registerOption ( m_dialog->branchAnchorName , ropt , "branch_name" );
|
//data.registerOption ( m_dialog->branchAnchorName , ropt , "branch_name" );
|
||||||
|
|||||||
@@ -349,9 +349,9 @@ bool PolicyCompiler_pf::fillDirection::processNext()
|
|||||||
{
|
{
|
||||||
rule->setDirection( PolicyRule::Both );
|
rule->setDirection( PolicyRule::Both );
|
||||||
|
|
||||||
Address *src=compiler->getFirstSrc(rule);
|
Address *src = compiler->getFirstSrc(rule);
|
||||||
Address *dst=compiler->getFirstDst(rule);
|
Address *dst = compiler->getFirstDst(rule);
|
||||||
string fwid=compiler->getFwId();
|
string fwid = compiler->getFwId();
|
||||||
|
|
||||||
if (src==NULL || dst==NULL)
|
if (src==NULL || dst==NULL)
|
||||||
compiler->abort("Broken src or dst in rule "+rule->getLabel());
|
compiler->abort("Broken src or dst in rule "+rule->getLabel());
|
||||||
|
|||||||
Reference in New Issue
Block a user