summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Buechler <cmb@pfsense.org>2016-05-06 21:59:31 -0500
committerChris Buechler <cmb@pfsense.org>2016-05-06 21:59:31 -0500
commit17be206e3ef3d4353600c3cda09c41252794918e (patch)
tree721cd03bc9d4433bf744b1fb5735b8663907ce95
parent8ad194c0261f4a89ca75007ab0759486b07b2cc2 (diff)
downloadpfsense-17be206e3ef3d4353600c3cda09c41252794918e.zip
pfsense-17be206e3ef3d4353600c3cda09c41252794918e.tar.gz
Don't divide by 0. Ticket #6329
-rw-r--r--src/usr/local/www/status_queues.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/usr/local/www/status_queues.php b/src/usr/local/www/status_queues.php
index 15baf2d..e27b96f 100644
--- a/src/usr/local/www/status_queues.php
+++ b/src/usr/local/www/status_queues.php
@@ -121,9 +121,9 @@ if ($_REQUEST['getactivity']) {
}
$finscript = "";
foreach ($statistics as $q) {
- if ($stat_type == "0") {
+ if ($stat_type == "0" && $bigger_stat != "0") {
$packet_s = round(100 * ($q->pps / $bigger_stat), 0);
- } else {
+ } else if ($bigger_stat != "0") {
$packet_s = round(100 * ($q->bandwidth / $bigger_stat), 0);
}
if ($packet_s < 0) {
OpenPOWER on IntegriCloud