From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Tremer To: development@lists.ipfire.org Subject: [PATCH 2/2] udev: Set wireless interfaces into AP mode before adding to bridge Date: Fri, 14 Feb 2020 13:48:19 +0000 Message-ID: <20200214134819.23170-2-michael.tremer@ipfire.org> In-Reply-To: <20200214134819.23170-1-michael.tremer@ipfire.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============3196604444050628629==" List-Id: --===============3196604444050628629== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Wireless interfaces cannot be added to the bridge when they are still running in station mode. At boot time, the interface will be created and it is attempted to attach it to a bridge, which fails. This patch now checks whether the wireless interface is going to be an access point, changes the mode accordingly and then attaches the interface to the bridge. Signed-off-by: Michael Tremer Tested-by: Daniel Weism=C3=BCller --- config/udev/network-hotplug-bridges | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/config/udev/network-hotplug-bridges b/config/udev/network-hotplu= g-bridges index 30a671f04..33d6d65ba 100644 --- a/config/udev/network-hotplug-bridges +++ b/config/udev/network-hotplug-bridges @@ -93,6 +93,10 @@ case "${MODE}" in #ip link set "${BRIDGE}" up fi =20 + if grep -q "INTERFACE=3D${INTERFACE}" "/var/ipfire/wlanap/settings" 2>/dev= /null; then + iw dev "${INTERFACE}" set type __ap + fi + # Attach the physical device logger "Attach ${INTERFACE} to ${BRIDGE}" ip link set dev "${INTERFACE}" master "${BRIDGE}" --=20 2.20.1 --===============3196604444050628629==--