diff options
author | Ermal Luçi <eri@pfsense.org> | 2013-07-02 03:51:08 -0700 |
---|---|---|
committer | Ermal Luçi <eri@pfsense.org> | 2013-07-02 03:51:08 -0700 |
commit | f5035e0b6a73a4b9637215ad3eaf262c90f38e9e (patch) | |
tree | 681742a25e896f3cf8b92fc788343e2ce1ee566a /etc/inc | |
parent | 6dcbd1b3ada8c5fdbcb2f10ac5b9791ad281b399 (diff) | |
parent | 216c80dd13360f3446cd1802905b3095afcbafe5 (diff) | |
download | pfsense-f5035e0b6a73a4b9637215ad3eaf262c90f38e9e.zip pfsense-f5035e0b6a73a4b9637215ad3eaf262c90f38e9e.tar.gz |
Merge pull request #680 from Klaws--/RELENG_2_1
Added previously missing class selectors cs1-cs7 plus VA (voice-admit), plus the TOS values which still work with DSCP
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")) |