mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Convert the shapers to the match action so the generated rules do not impact the filtering policy implemented.
This commit is contained in:
parent
a391d0ab12
commit
b3205cc39e
@ -949,6 +949,7 @@ function apply_all_choosen_items() {
|
||||
if ($penalty) {
|
||||
if( is_ipaddr($config['ezshaper']['step4']['address']) || is_alias($config['ezshaper']['step4']['address'])) {
|
||||
$rule = array();
|
||||
$rule['type'] = "match";
|
||||
$rule['descr'] = gettext("Penalty Box");
|
||||
$rule['direction'] = "out";
|
||||
$rule['source']['any'] = TRUE;
|
||||
@ -968,6 +969,7 @@ function apply_all_choosen_items() {
|
||||
if( is_ipaddr($config['ezshaper']['step3']['address']) || is_alias($config['ezshaper']['step3']['address'])) {
|
||||
/* create VOIP rules */
|
||||
$rule = array();
|
||||
$rule['type'] = "match";
|
||||
$rule['descr'] = gettext("VOIP Adapter");
|
||||
$rule['direction'] = "out";
|
||||
$rule['protocol'] = "udp";
|
||||
@ -982,6 +984,7 @@ function apply_all_choosen_items() {
|
||||
} elseif( $config['ezshaper']['step3']['provider'] == "Generic" ) {
|
||||
/* create VOIP rules */
|
||||
$rule = array();
|
||||
$rule['type'] = "match";
|
||||
$rule['descr'] = "DiffServ/Lowdelay/Upload";
|
||||
$rule['direction'] = "out";
|
||||
$rule['protocol'] = "udp";
|
||||
@ -997,6 +1000,7 @@ function apply_all_choosen_items() {
|
||||
} else {
|
||||
/* loop through voiplist[] */
|
||||
foreach ($voiplist[$config['ezshaper']['step3']['provider']] as $voip) {
|
||||
$rule = array();
|
||||
$rule = array();
|
||||
$rule['defaultqueue'] = 'qVoIP';
|
||||
$rule['direction'] = "out";
|
||||
@ -1020,6 +1024,7 @@ function apply_all_choosen_items() {
|
||||
if (!is_array($p2plist[$key]))
|
||||
continue;
|
||||
foreach ($p2plist[$key] as $p2pclient) {
|
||||
$rule = array();
|
||||
$rule = array();
|
||||
$rule['defaultqueue'] = 'qP2P';
|
||||
$rule['direction'] = "out";
|
||||
@ -1042,6 +1047,7 @@ function apply_all_choosen_items() {
|
||||
if (!is_array($gamesplist[$key]))
|
||||
continue;
|
||||
foreach ($gamesplist[$key] as $Gameclient) {
|
||||
$rule = array();
|
||||
$rule = array();
|
||||
$rule['defaultqueue'] = 'qGames';
|
||||
if ($Gameclient[1] == "tcp")
|
||||
@ -1067,6 +1073,7 @@ function apply_all_choosen_items() {
|
||||
if (!is_array($othersplist[$key]))
|
||||
continue;
|
||||
foreach ($othersplist[$key] as $otherclient) {
|
||||
$rule = array();
|
||||
$rule = array();
|
||||
switch ($val) {
|
||||
case "H":
|
||||
|
||||
@ -1006,6 +1006,7 @@ function apply_all_choosen_items() {
|
||||
if ($penalty) {
|
||||
if( is_ipaddr($config['ezshaper']['step4']['address']) || is_alias($config['ezshaper']['step4']['address'])) {
|
||||
$rule = array();
|
||||
$rule['type'] = "match";
|
||||
$rule['descr'] = gettext("Penalty Box");
|
||||
$rule['direction'] = "out";
|
||||
$rule['source']['any'] = TRUE;
|
||||
@ -1025,6 +1026,7 @@ function apply_all_choosen_items() {
|
||||
if( is_ipaddr($config['ezshaper']['step3']['address']) || is_alias($config['ezshaper']['step3']['address'])) {
|
||||
/* create VOIP rules */
|
||||
$rule = array();
|
||||
$rule['type'] = "match";
|
||||
$rule['descr'] = gettext("VOIP Adapter");
|
||||
$rule['direction'] = "out";
|
||||
$rule['protocol'] = "udp";
|
||||
@ -1039,6 +1041,7 @@ function apply_all_choosen_items() {
|
||||
} elseif( $config['ezshaper']['step3']['provider'] == "Generic" ) {
|
||||
/* create VOIP rules */
|
||||
$rule = array();
|
||||
$rule['type'] = "match";
|
||||
$rule['descr'] = "DiffServ/Lowdelay/Upload";
|
||||
$rule['direction'] = "out";
|
||||
$rule['protocol'] = "udp";
|
||||
@ -1055,6 +1058,7 @@ function apply_all_choosen_items() {
|
||||
/* loop through voiplist[] */
|
||||
foreach ($voiplist[$config['ezshaper']['step3']['provider']] as $voip) {
|
||||
$rule = array();
|
||||
$rule['type'] = "match";
|
||||
$rule['defaultqueue'] = 'qVoIP';
|
||||
$rule['direction'] = "out";
|
||||
$rule['source']['any'] = TRUE;
|
||||
@ -1078,6 +1082,7 @@ function apply_all_choosen_items() {
|
||||
continue;
|
||||
foreach ($p2plist[$key] as $p2pclient) {
|
||||
$rule = array();
|
||||
$rule['type'] = "match";
|
||||
$rule['defaultqueue'] = 'qP2P';
|
||||
$rule['direction'] = "out";
|
||||
$rule['source']['any'] = TRUE;
|
||||
@ -1100,6 +1105,7 @@ function apply_all_choosen_items() {
|
||||
continue;
|
||||
foreach ($gamesplist[$key] as $Gameclient) {
|
||||
$rule = array();
|
||||
$rule['type'] = "match";
|
||||
$rule['defaultqueue'] = 'qGames';
|
||||
if ($Gameclient[1] == "tcp")
|
||||
$rule['ackqueue'] = 'qACK';
|
||||
@ -1125,6 +1131,7 @@ function apply_all_choosen_items() {
|
||||
continue;
|
||||
foreach ($othersplist[$key] as $otherclient) {
|
||||
$rule = array();
|
||||
$rule['type'] = "match";
|
||||
switch ($val) {
|
||||
case "H":
|
||||
$rule['defaultqueue'] = 'qOthersHigh'; /* posted value H or L */
|
||||
|
||||
@ -1039,6 +1039,7 @@ function apply_all_choosen_items() {
|
||||
if ($penalty) {
|
||||
if( is_ipaddr($config['ezshaper']['step4']['address']) || is_alias($config['ezshaper']['step4']['address'])) {
|
||||
$rule = array();
|
||||
$rule['type'] = "match";
|
||||
$rule['descr'] = gettext("Penalty Box");
|
||||
$rule['direction'] = "out";
|
||||
$rule['source']['any'] = TRUE;
|
||||
@ -1058,6 +1059,7 @@ function apply_all_choosen_items() {
|
||||
if( is_ipaddr($config['ezshaper']['step3']['address']) || is_alias($config['ezshaper']['step3']['address'])) {
|
||||
/* create VOIP rules */
|
||||
$rule = array();
|
||||
$rule['type'] = "match";
|
||||
$rule['descr'] = gettext("VOIP Adapter");
|
||||
$rule['direction'] = "out";
|
||||
$rule['protocol'] = "udp";
|
||||
@ -1072,6 +1074,7 @@ function apply_all_choosen_items() {
|
||||
} elseif( $config['ezshaper']['step3']['provider'] == "Generic" ) {
|
||||
/* create VOIP rules */
|
||||
$rule = array();
|
||||
$rule['type'] = "match";
|
||||
$rule['descr'] = "DiffServ/Lowdelay/Upload";
|
||||
$rule['direction'] = "out";
|
||||
$rule['protocol'] = "udp";
|
||||
@ -1088,6 +1091,7 @@ function apply_all_choosen_items() {
|
||||
/* loop through voiplist[] */
|
||||
foreach ($voiplist[$config['ezshaper']['step3']['provider']] as $voip) {
|
||||
$rule = array();
|
||||
$rule['type'] = "match";
|
||||
$rule['defaultqueue'] = 'qVoIP';
|
||||
$rule['direction'] = "out";
|
||||
$rule['source']['any'] = TRUE;
|
||||
@ -1111,6 +1115,7 @@ function apply_all_choosen_items() {
|
||||
continue;
|
||||
foreach ($p2plist[$key] as $p2pclient) {
|
||||
$rule = array();
|
||||
$rule['type'] = "match";
|
||||
$rule['defaultqueue'] = 'qP2P';
|
||||
$rule['direction'] = "out";
|
||||
$rule['source']['any'] = TRUE;
|
||||
@ -1133,6 +1138,7 @@ function apply_all_choosen_items() {
|
||||
continue;
|
||||
foreach ($gamesplist[$key] as $Gameclient) {
|
||||
$rule = array();
|
||||
$rule['type'] = "match";
|
||||
$rule['defaultqueue'] = 'qGames';
|
||||
if ($Gameclient[1] == "tcp")
|
||||
$rule['ackqueue'] = 'qACK';
|
||||
@ -1158,6 +1164,7 @@ function apply_all_choosen_items() {
|
||||
continue;
|
||||
foreach ($othersplist[$key] as $otherclient) {
|
||||
$rule = array();
|
||||
$rule['type'] = "match";
|
||||
switch ($val) {
|
||||
case "H":
|
||||
$rule['defaultqueue'] = 'qOthersHigh'; /* posted value H or L */
|
||||
|
||||
@ -1178,6 +1178,7 @@ function apply_all_choosen_items() {
|
||||
if ($penalty) {
|
||||
if( is_ipaddr($config['ezshaper']['step4']['address']) || is_alias($config['ezshaper']['step4']['address'])) {
|
||||
$rule = array();
|
||||
$rule['type'] = "match";
|
||||
$rule['descr'] = gettext("Penalty Box");
|
||||
$rule['direction'] = "out";
|
||||
$rule['source']['any'] = TRUE;
|
||||
@ -1197,6 +1198,7 @@ function apply_all_choosen_items() {
|
||||
if( is_ipaddr($config['ezshaper']['step3']['address']) || is_alias($config['ezshaper']['step3']['address'])) {
|
||||
/* create VOIP rules */
|
||||
$rule = array();
|
||||
$rule['type'] = "match";
|
||||
$rule['descr'] = gettext("VOIP Adapter");
|
||||
$rule['direction'] = "out";
|
||||
$rule['protocol'] = "udp";
|
||||
@ -1211,6 +1213,7 @@ function apply_all_choosen_items() {
|
||||
} elseif( $config['ezshaper']['step3']['provider'] == "Generic" ) {
|
||||
/* create VOIP rules */
|
||||
$rule = array();
|
||||
$rule['type'] = "match";
|
||||
$rule['descr'] = "DiffServ/Lowdelay/Upload";
|
||||
$rule['direction'] = "out";
|
||||
$rule['protocol'] = "udp";
|
||||
@ -1227,6 +1230,7 @@ function apply_all_choosen_items() {
|
||||
/* loop through voiplist[] */
|
||||
foreach ($voiplist[$config['ezshaper']['step3']['provider']] as $voip) {
|
||||
$rule = array();
|
||||
$rule['type'] = "match";
|
||||
$rule['defaultqueue'] = 'qVoIP';
|
||||
$rule['direction'] = "out";
|
||||
$rule['source']['any'] = TRUE;
|
||||
@ -1250,6 +1254,7 @@ function apply_all_choosen_items() {
|
||||
continue;
|
||||
foreach ($p2plist[$key] as $p2pclient) {
|
||||
$rule = array();
|
||||
$rule['type'] = "match";
|
||||
$rule['defaultqueue'] = 'qP2P';
|
||||
$rule['direction'] = "out";
|
||||
$rule['source']['any'] = TRUE;
|
||||
@ -1272,6 +1277,7 @@ function apply_all_choosen_items() {
|
||||
continue;
|
||||
foreach ($gamesplist[$key] as $Gameclient) {
|
||||
$rule = array();
|
||||
$rule['type'] = "match";
|
||||
$rule['defaultqueue'] = 'qGames';
|
||||
if ($Gameclient[1] == "tcp")
|
||||
$rule['ackqueue'] = 'qACK';
|
||||
@ -1297,6 +1303,7 @@ function apply_all_choosen_items() {
|
||||
continue;
|
||||
foreach ($othersplist[$key] as $otherclient) {
|
||||
$rule = array();
|
||||
$rule['type'] = "match";
|
||||
switch ($val) {
|
||||
case "H":
|
||||
$rule['defaultqueue'] = 'qOthersHigh'; /* posted value H or L */
|
||||
|
||||
Loading…
Reference in New Issue
Block a user