summaryrefslogtreecommitdiffstats
path: root/etc/inc/filter.inc
diff options
context:
space:
mode:
authorKlaws-- <github@stock-consulting.com>2013-07-02 12:34:03 +0200
committerKlaws-- <github@stock-consulting.com>2013-07-02 12:34:03 +0200
commit1227101b9d908d110bb26f1042c1102c5ddc1c85 (patch)
tree83bf2ce66646e8b9ad3e91b68a5333e2325af58b /etc/inc/filter.inc
parent2b125a17e91b5b63694de0c272e5f4fd154598da (diff)
downloadpfsense-1227101b9d908d110bb26f1042c1102c5ddc1c85.zip
pfsense-1227101b9d908d110bb26f1042c1102c5ddc1c85.tar.gz
Added previously missing class selectors cs1-cs7 plus VA (voice-admit), plus the TOS values which still work with DSCP
Definitely requires my patches to the kernel patches to work (dscp.RELENG_*.diff). OTOH, it is currently broken anyway, so wahtever happens, it cannot get more broken. ;-) Reasons for inclusion of the missing classes into filter.inc (and not the kernel): 1.I wanted to keep kernel changes to a minimum. 2.This approach provides a clear point if users need to add their own DSCPs. Yup, two of the DSCP pools are reserved for experimental and internal use...didn't want to add 'em all (2*16 DSCPs) to the list. http://forum.pfsense.org/index.php/topic,63580.0.html Redmine entry: http://redmine.pfsense.org/issues/2998
Diffstat (limited to 'etc/inc/filter.inc')
-rw-r--r--etc/inc/filter.inc15
1 files changed, 13 insertions, 2 deletions
diff --git a/etc/inc/filter.inc b/etc/inc/filter.inc
index 60feb1d..1db82a3 100644
--- a/etc/inc/filter.inc
+++ b/etc/inc/filter.inc
@@ -2252,8 +2252,19 @@ function filter_generate_user_rule($rule) {
$aline['tag'] = " tag " .$rule['tag']. " ";
if (!empty($rule['tagged']))
$aline['tagged'] = " tagged " .$rule['tagged'] . " ";
- if (!empty($rule['dscp']))
- $aline['dscp'] = " dscp " . $rule['dscp'] . " ";
+ if (!empty($rule['dscp'])) {
+ switch (strtolower($rule['dscp'])) {
+ case 'va': $aline['dscp'] = " dscp 44 "; break;
+ case 'cs1': $aline['dscp'] = " dscp 8 "; break;
+ case 'cs2': $aline['dscp'] = " dscp 16 "; break;
+ case 'cs3': $aline['dscp'] = " dscp 24 "; break;
+ case 'cs4': $aline['dscp'] = " dscp 32 "; break;
+ case 'cs5': $aline['dscp'] = " dscp 40 "; break;
+ case 'cs6': $aline['dscp'] = " dscp 48 "; break;
+ case 'cs7': $aline['dscp'] = " dscp 56 "; break;
+ default: $aline['dscp'] = " dscp " . $rule['dscp'] . " "; break;
+ }
+ }
if (!empty($rule['vlanprio']) && ($rule['vlanprio'] != "none"))
$aline['vlanprio'] = " ieee8021q-pcp " . $rule['vlanprio'] . " ";
if (!empty($rule['vlanprioset']) && ($rule['vlanprioset'] != "none"))
OpenPOWER on IntegriCloud