summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorErmal Luçi <eri@pfsense.org>2009-03-01 16:30:58 +0000
committerErmal Luçi <eri@pfsense.org>2009-03-01 16:30:58 +0000
commitd2960c0e4295b0c29f58979dfdd9eba195eaa36f (patch)
tree268fca36ba9f436e22390f0a72542c3361bf2c6a /etc
parent20c79427dc6fa01dfa53bd71571acf1d7e03fa6d (diff)
downloadpfsense-d2960c0e4295b0c29f58979dfdd9eba195eaa36f.zip
pfsense-d2960c0e4295b0c29f58979dfdd9eba195eaa36f.tar.gz
Tag/Tagged/DSCP can be used for blocking too.
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/filter.inc16
1 files changed, 8 insertions, 8 deletions
diff --git a/etc/inc/filter.inc b/etc/inc/filter.inc
index d2f02cf..9205461 100644
--- a/etc/inc/filter.inc
+++ b/etc/inc/filter.inc
@@ -1538,13 +1538,13 @@ function generate_user_filter_rule($rule)
if (($rule['protocol'] == "icmp") && $rule['icmptype']) {
$aline['icmp-type'] = "icmp-type {$rule['icmptype']} ";
}
+ if (!empty($rule['tag']))
+ $aline['tag'] = " tag " .$rule['tag']. " ";
+ if (!empty($rule['tagged']))
+ $aline['tagged'] = " tagged " .$rule['tagged'] . " ";
+ if (!empty($rule['dscp']))
+ $aline['dscp'] = " dscp " . $rule['dscp'] . " ";
if ($type == "pass") {
- if (!empty($rule['tag']))
- $aline['tag'] = " tag " .$rule['tag']. " ";
- if (!empty($rule['tagged']))
- $aline['tagged'] = " tagged " .$rule['tagged'] . " ";
- if (!empty($rule['dscp']))
- $aline['dscp'] = " dscp " . $rule['dscp'] . " ";
if (isset($rule['allowopts']))
$aline['allowopts'] = " allow-opts ";
if( isset($rule['source-track']) or isset($rule['max-src-nodes']) or isset($rule['max-src-states']) )
@@ -1564,7 +1564,7 @@ function generate_user_filter_rule($rule)
queueing in certain situations. please check the faq.
*/
$noadvoptions = false;
- if (isset($rule['Statetype']) && $rule['statetype'] <> "") {
+ if (isset($rule['statetype']) && $rule['statetype'] <> "") {
switch($rule['statetype']) {
case "none":
$noadvoptions = true;
@@ -1608,7 +1608,7 @@ function generate_user_filter_rule($rule)
$aline['flags'] .= " ) ";
}
- }
+ }
if ($type == "reject" && $rule['protocol'] == "tcp") {
/* special reject packet */
$aline['flags'] .= "flags S/SA ";
OpenPOWER on IntegriCloud