From c08095065ed30783ae7dec06c34e9ca26babbe87 Mon Sep 17 00:00:00 2001 From: Brian Beattie Date: Sat, 6 Dec 2025 17:24:46 -0800 Subject: [PATCH] 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 --- src/RaspAP/Networking/Hotspot/HostapdManager.php | 4 ++-- src/RaspAP/Networking/Hotspot/HotspotService.php | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/RaspAP/Networking/Hotspot/HostapdManager.php b/src/RaspAP/Networking/Hotspot/HostapdManager.php index 0caa1523..f0ba3874 100644 --- a/src/RaspAP/Networking/Hotspot/HostapdManager.php +++ b/src/RaspAP/Networking/Hotspot/HostapdManager.php @@ -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']; } diff --git a/src/RaspAP/Networking/Hotspot/HotspotService.php b/src/RaspAP/Networking/Hotspot/HotspotService.php index 1fff4bde..10e2f912 100644 --- a/src/RaspAP/Networking/Hotspot/HotspotService.php +++ b/src/RaspAP/Networking/Hotspot/HotspotService.php @@ -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']);