From b9ba2946a546ed9d388347d7b5eb02f9c24c0ceb Mon Sep 17 00:00:00 2001 From: billz Date: Wed, 10 Jun 2020 09:09:10 +0100 Subject: [PATCH] Fix: display AP interface stats --- includes/dashboard.php | 3 +-- templates/dashboard.php | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/includes/dashboard.php b/includes/dashboard.php index 0fd1831f..ab26c934 100755 --- a/includes/dashboard.php +++ b/includes/dashboard.php @@ -22,7 +22,7 @@ function DisplayDashboard(&$extraFooterScripts) $status->showMessages(); return; } - exec('ip a show '.$_SESSION['wifi_client_interface'], $stdoutIp); + exec('ip a show '.$_SESSION['ap_interface'], $stdoutIp); $stdoutIpAllLinesGlued = implode(" ", $stdoutIp); $stdoutIpWRepeatedSpaces = preg_replace('/\s\s+/', ' ', $stdoutIpAllLinesGlued); @@ -89,7 +89,6 @@ function DisplayDashboard(&$extraFooterScripts) define('SSIDMAXLEN', 32); // Warning iw comes with: "Do NOT screenscrape this tool, we don't consider its output stable." - // fetch first wireless interface exec('iw dev ' .$_SESSION['wifi_client_interface']. ' link ', $stdoutIw); $stdoutIwAllLinesGlued = implode(' ', $stdoutIw); $stdoutIwWRepSpaces = preg_replace('/\s\s+/', ' ', $stdoutIwAllLinesGlued); diff --git a/templates/dashboard.php b/templates/dashboard.php index 1ce73bea..b7257de6 100755 --- a/templates/dashboard.php +++ b/templates/dashboard.php @@ -3,7 +3,7 @@ $arrHostapdConf = parse_ini_file(RASPI_CONFIG.'/hostapd.ini'); if ($arrHostapdConf['WifiAPEnable'] == 1) { $client_interface = 'uap0'; } else { - $client_interface = $_SESSION['wifi_client_interface']; + $client_interface = $_SESSION['ap_interface']; } $ap_iface = $_SESSION['ap_interface']; $MACPattern = '"([[:xdigit:]]{2}:){5}[[:xdigit:]]{2}"'; @@ -40,7 +40,7 @@ $ifaceStatus = $wlan0up ? "up" : "down";

-
+