Merge pull request #1528 from RaspAP/fix/hostapd-iface-check

Fix: Exec iwgetid with client iface session var
This commit is contained in:
Bill Zimmerman 2024-02-24 10:41:50 +01:00 committed by GitHub
commit 55508262de
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -70,8 +70,8 @@ function DisplayHostAPDConfig()
}
}
exec('cat '. RASPI_HOSTAPD_CONFIG, $hostapdconfig);
if (isset($interface)) {
exec('iwgetid '. $interface. ' -r', $wifiNetworkID);
if (isset($_SESSION['wifi_client_interface'])) {
exec('iwgetid '.$_SESSION['wifi_client_interface']. ' -r', $wifiNetworkID);
if (!empty($wifiNetworkID[0])) {
$managedModeEnabled = true;
}