diff options
author | Klaws-- <github@stock-consulting.com> | 2013-06-29 13:33:46 +0200 |
---|---|---|
committer | Klaws-- <github@stock-consulting.com> | 2013-06-29 13:33:46 +0200 |
commit | 6e0d8f820fa0e9fb906751b56ba128f6e0742349 (patch) | |
tree | 2bc35b798a81e64fe94aa504b54034a941257700 /etc/inc | |
parent | b275b6589670d64270088d0933f02fcc2695945f (diff) | |
download | pfsense-6e0d8f820fa0e9fb906751b56ba128f6e0742349.zip pfsense-6e0d8f820fa0e9fb906751b56ba128f6e0742349.tar.gz |
Added previously missing class selectors cs1-cs7 plaus VA (voice-admit)
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
Diffstat (limited to 'etc/inc')
-rw-r--r-- | etc/inc/filter.inc | 15 |
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")) |