mirror of
https://github.com/fwbuilder/fwbuilder
synced 2026-09-13 16:39:48 +02:00
see #2367 ipfw actions queue,pipe and divert are terminating so we do not need to add permit to the generated command
This commit is contained in:
@@ -136,6 +136,9 @@
|
||||
<xsl:when test="($pf_make_terminating = 'True') and ($platform = 'pf')">
|
||||
<xsl:attribute name="action">Accept</xsl:attribute>
|
||||
</xsl:when>
|
||||
<xsl:when test="$platform = 'ipfw'">
|
||||
<xsl:attribute name="action">Accept</xsl:attribute>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:attribute name="action">Continue</xsl:attribute>
|
||||
</xsl:otherwise>
|
||||
|
||||
@@ -159,10 +159,29 @@ string PolicyCompiler_ipfw::PrintRule::_printTCPFlags(TCPService *srv)
|
||||
|
||||
void PolicyCompiler_ipfw::PrintRule::_printAction(PolicyRule *rule)
|
||||
{
|
||||
FWOptions *ruleopt =rule->getOptionsObject();
|
||||
Service *srv=compiler->getFirstSrv(rule); assert(srv);
|
||||
FWOptions *ruleopt = rule->getOptionsObject();
|
||||
Service *srv = compiler->getFirstSrv(rule);
|
||||
assert(srv);
|
||||
|
||||
switch (rule->getAction()) {
|
||||
if (rule->getClassification())
|
||||
{
|
||||
int portNum = ruleopt->getInt("ipfw_pipe_queue_num");
|
||||
switch (ruleopt->getInt("ipfw_classify_method"))
|
||||
{
|
||||
case DUMMYNETPIPE:
|
||||
compiler->output << "pipe " << portNum << " ";
|
||||
return;
|
||||
case DUMMYNETQUEUE:
|
||||
compiler->output << "queue " << portNum << " ";
|
||||
return;
|
||||
default:
|
||||
compiler->output << "divert " << portNum << " ";
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
switch (rule->getAction())
|
||||
{
|
||||
case PolicyRule::Skip:
|
||||
compiler->output << "skipto " << rule->getInt("skip_to") << " ";
|
||||
break;
|
||||
@@ -223,22 +242,6 @@ void PolicyCompiler_ipfw::PrintRule::_printAction(PolicyRule *rule)
|
||||
// compiler->output << rule->getActionAsString() << " ";
|
||||
}
|
||||
|
||||
if (rule->getClassification())
|
||||
{
|
||||
int portNum = ruleopt->getInt("ipfw_pipe_queue_num");
|
||||
switch (ruleopt->getInt("ipfw_classify_method"))
|
||||
{
|
||||
case DUMMYNETPIPE:
|
||||
compiler->output << "pipe " << portNum << " ";
|
||||
break;
|
||||
case DUMMYNETQUEUE:
|
||||
compiler->output << "queue " << portNum << " ";
|
||||
break;
|
||||
default:
|
||||
compiler->output << "divert " << portNum << " ";
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user