Fix bridged mode setting incorrect bridge parameter

When bridged mode is enabled, the bridge parameter in hostapd.conf
was set to "1" instead of "br0", causing authentication failures.

This fix introduces a separate bridgeName parameter for the hostapd
configuration while maintaining the boolean bridge parameter for
dnsmasq and dhcpcd services.

Fixes #2021
This commit is contained in:
Brian Beattie
2025-12-06 17:24:46 -08:00
parent 42a2a299c2
commit c08095065e
2 changed files with 3 additions and 2 deletions

View File

@@ -209,9 +209,9 @@ class HostapdManager
}
// bridge handling
if (!empty($params['bridge'])) {
if (!empty($params['bridgeName'])) {
$config[] = 'interface=' . $params['interface'];
$config[] = 'bridge=' . $params['bridge'];
$config[] = 'bridge=' . $params['bridgeName'];
} else {
$config[] = 'interface=' . $params['interface'];
}

View File

@@ -145,6 +145,7 @@ class HotspotService
try {
// normalize state flags
$validated['interface'] = $apIface;
$validated["bridgeName"] = !empty($states["BridgedEnable"]) ? "br0" : null;
$validated['bridge'] = !empty($states['BridgedEnable']);
$validated['apsta'] = !empty($states['WifiAPEnable']);
$validated['repeater'] = !empty($states['RepeaterEnable']);