From 1227101b9d908d110bb26f1042c1102c5ddc1c85 Mon Sep 17 00:00:00 2001 From: Klaws-- Date: Tue, 2 Jul 2013 12:34:03 +0200 Subject: [PATCH 1/2] 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 --- etc/inc/filter.inc | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/etc/inc/filter.inc b/etc/inc/filter.inc index 60feb1d454..1db82a3121 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")) From dc63650a8804157ea8938f641f11ec55527ad44c Mon Sep 17 00:00:00 2001 From: Klaws-- Date: Tue, 2 Jul 2013 12:37:35 +0200 Subject: [PATCH 2/2] 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 --- usr/local/www/guiconfig.inc | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/usr/local/www/guiconfig.inc b/usr/local/www/guiconfig.inc index 3e9be448f7..0da6d1e667 100755 --- a/usr/local/www/guiconfig.inc +++ b/usr/local/www/guiconfig.inc @@ -108,9 +108,16 @@ $firewall_rules_dscp_types = array("af11", "af42", "af43", "EF", - "1-64", - "0x10", - "0x04-0xfc"); + "cs1", + "cs2", + "cs3", + "cs4", + "cs5", + "cs6", + "cs7", + "0x01 (reliability, ToS 0x04)", + "0x02 (throughput, ToS 0x08)", + "0x04 (lowdelay, ToS 0x10)"); $auth_server_types = array( 'ldap' => "LDAP",