diff options
author | Seth Mos <seth.mos@dds.nl> | 2011-02-16 09:11:05 +0100 |
---|---|---|
committer | Seth Mos <seth.mos@dds.nl> | 2011-02-16 09:11:05 +0100 |
commit | f698b26293d5a1df1c87b4dbcd908b597da07493 (patch) | |
tree | b0c9b856c1b869819c0032c5eec64d95184ce767 /usr/local/www/wizards/traffic_shaper_wizard.inc | |
parent | bd40781aaa7aa947e924f21e2845d87be5993bbd (diff) | |
parent | b807a1619230c8e19193a39ed8c4c513dd8e005b (diff) | |
download | pfsense-f698b26293d5a1df1c87b4dbcd908b597da07493.zip pfsense-f698b26293d5a1df1c87b4dbcd908b597da07493.tar.gz |
Merge remote branch 'upstream/master'
Diffstat (limited to 'usr/local/www/wizards/traffic_shaper_wizard.inc')
-rw-r--r-- | usr/local/www/wizards/traffic_shaper_wizard.inc | 35 |
1 files changed, 22 insertions, 13 deletions
diff --git a/usr/local/www/wizards/traffic_shaper_wizard.inc b/usr/local/www/wizards/traffic_shaper_wizard.inc index 7869309..9de74a2 100644 --- a/usr/local/www/wizards/traffic_shaper_wizard.inc +++ b/usr/local/www/wizards/traffic_shaper_wizard.inc @@ -456,15 +456,24 @@ function step3_stepsubmitphpaction() { $stepid--; return; } - $factor = wizard_get_bandwidthtype_scale($config['ezshaper']['step2']["conn{$i}uploadspeed"]); - $ifbw = $factor * floatval($config['ezshaper']['step2']["conn{$i}upload"]); - $factor = wizard_get_bandwidthtype_scale($_POST["conn{$i}uploadspeed"]); - $input_bw = $factor * floatval($_POST["conn{$i}upload"]); - if ((0.8 * $ifbw) < $input_bw) { - $friendly_interface = $i+1; - $savemsg=gettext("You cannot set the VoIP upload bandwidth on WAN #{$friendly_interface} higher than 80% of the connection."); - $stepid--; - return; + if ($_POST["conn{$i}uploadspeed"] == "%") { + if (intval($_POST["conn{$i}upload"]) > 80) { + $friendly_interface = $i+1; + $savemsg=gettext("You cannot set the VoIP upload bandwidth on WAN #{$friendly_interface} higher than 80% of the connection."); + $stepid--; + return; + } + } else { + $factor = wizard_get_bandwidthtype_scale($config['ezshaper']['step2']["conn{$i}uploadspeed"]); + $ifbw = $factor * floatval($config['ezshaper']['step2']["conn{$i}upload"]); + $factor = wizard_get_bandwidthtype_scale($_POST["conn{$i}uploadspeed"]); + $input_bw = $factor * floatval($_POST["conn{$i}upload"]); + if ((0.8 * $ifbw) < $input_bw) { + $friendly_interface = $i+1; + $savemsg=gettext("You cannot set the VoIP upload bandwidth on WAN #{$friendly_interface} higher than 80% of the connection."); + $stepid--; + return; + } } } @@ -1001,7 +1010,7 @@ function apply_all_choosen_items() { /* loop through voiplist[] */ foreach ($voiplist[$config['ezshaper']['step3']['provider']] as $voip) { $rule = array(); - $rule = array(); + $rule['type'] = "match"; $rule['defaultqueue'] = 'qVoIP'; $rule['direction'] = "out"; $rule['source']['any'] = TRUE; @@ -1025,7 +1034,7 @@ function apply_all_choosen_items() { continue; foreach ($p2plist[$key] as $p2pclient) { $rule = array(); - $rule = array(); + $rule['type'] = "match"; $rule['defaultqueue'] = 'qP2P'; $rule['direction'] = "out"; $rule['source']['any'] = TRUE; @@ -1048,7 +1057,7 @@ function apply_all_choosen_items() { continue; foreach ($gamesplist[$key] as $Gameclient) { $rule = array(); - $rule = array(); + $rule['type'] = "match"; $rule['defaultqueue'] = 'qGames'; if ($Gameclient[1] == "tcp") $rule['ackqueue'] = 'qACK'; @@ -1074,7 +1083,7 @@ function apply_all_choosen_items() { continue; foreach ($othersplist[$key] as $otherclient) { $rule = array(); - $rule = array(); + $rule['type'] = "match"; switch ($val) { case "H": $rule['defaultqueue'] = 'qOthersHigh'; /* posted value H or L */ |