summaryrefslogtreecommitdiffstats
path: root/usr/local/www/bandwidth_by_ip.php
diff options
context:
space:
mode:
authorPhil Davis <phil.davis@world.inf.org>2014-02-08 21:21:48 -0800
committerPhil Davis <phil.davis@world.inf.org>2014-02-08 21:21:48 -0800
commit737aef33742d2dcfc33b5bf1cec0fa53c189c20d (patch)
treee12cdb3682a29170f93258ad40a0950dad8e9ac1 /usr/local/www/bandwidth_by_ip.php
parent5177b583ebeb4c01f24da588448b1143b252fc12 (diff)
downloadpfsense-737aef33742d2dcfc33b5bf1cec0fa53c189c20d.zip
pfsense-737aef33742d2dcfc33b5bf1cec0fa53c189c20d.tar.gz
Make Local the default filter for Traffic Graph
to preserve the old behavior, that it shows "Local" traffic when first started.
Diffstat (limited to 'usr/local/www/bandwidth_by_ip.php')
-rwxr-xr-xusr/local/www/bandwidth_by_ip.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/usr/local/www/bandwidth_by_ip.php b/usr/local/www/bandwidth_by_ip.php
index 9fd996a..3bad998 100755
--- a/usr/local/www/bandwidth_by_ip.php
+++ b/usr/local/www/bandwidth_by_ip.php
@@ -30,9 +30,12 @@ $intip = find_interface_ip($real_interface);
$netmask = find_interface_subnet($real_interface);
$intsubnet = gen_subnet($intip, $netmask) . "/$netmask";
-// see if they want all, local or remote IPs returned
+// see if they want local, remote or all IPs returned
$filter = $_GET['filter'];
+if ($filter == "")
+ $filter = "local";
+
if ($filter == "local") {
$ratesubnet = "-c " . $intsubnet;
} else {
@@ -79,7 +82,7 @@ for ($x=2; $x<12; $x++){
$emptyinfocounter = 1;
if ($bandwidthinfo != "") {
$infoarray = explode (":",$bandwidthinfo);
- if (($filter == "") ||
+ if (($filter == "all") ||
(($filter == "local") && (ip_in_subnet($infoarray[0], $intsubnet))) ||
(($filter == "remote") && (!ip_in_subnet($infoarray[0], $intsubnet)))) {
if ($hostipformat == "") {
OpenPOWER on IntegriCloud