From: Michael Tremer Date: Fri, 14 Feb 2020 13:43:49 +0000 (+0100) Subject: udev: Set wireless interfaces into AP mode before adding to bridge X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0ff1738524bcd9a861da5b18d898907b467c3577;p=people%2Fms%2Fipfire-2.x.git udev: Set wireless interfaces into AP mode before adding to bridge 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üller --- diff --git a/config/udev/network-hotplug-bridges b/config/udev/network-hotplug-bridges index 30a671f04f..33d6d65ba5 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 + if grep -q "INTERFACE=${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}"