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:
Vadim Kurland
2011-05-06 18:21:41 -07:00
parent 61929176e1
commit 5a85c2d669
2 changed files with 25 additions and 19 deletions
@@ -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>
+22 -19
View File
@@ -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;
}
}
}
/*