From patchwork Fri Feb 14 13:48:19 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Michael Tremer X-Patchwork-Id: 2792 Return-Path: Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail01.haj.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 48Jvpz2FNsz3wcD for ; Fri, 14 Feb 2020 13:48:27 +0000 (UTC) Received: from mail02.haj.ipfire.org (mail02.haj.ipfire.org [172.28.1.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384 client-signature ECDSA (P-384) client-digest SHA384) (Client CN "mail02.haj.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 48Jvpx6715z130; Fri, 14 Feb 2020 13:48:25 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=201909ed25519; t=1581688106; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=eP1Pz2AlVw9tr4pz+1UqIhCgv6UHymhQEt8VBtxuycs=; b=h3ZEdARR/nOayUD+Zu5K0bB2B5utgubaMD6SoZOmSs+qf9Cv19jaEAStd3LrGOMm3AWsB2 AVAi/nWqlhwLk+Cg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=201909rsa; t=1581688106; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=eP1Pz2AlVw9tr4pz+1UqIhCgv6UHymhQEt8VBtxuycs=; b=MLpmWs+BSohaE2pjv/+9+N35pPEtzh0utr1UlJv4A5IiSMtOIXGvMuuYaljYwe8lE1jDAL nXknkZOOu81ucMofp7zHbiuvINFDOUMSPcY3w79hY3JMSwInMf3NfOIZtwBW09DAf+JoxY TIzUOSKiafRbCjJc9HXxHn7l0AeqHWbWaPzhTT4q4OVpn6kDoBWh+Vw98aJE1lXw7MuAzE iDwkF3s1kmX03fDFCkWapGaHl3qG6ejq3N7aJAEyLKyzL4K5URmVaGus4WPR7ujkr4d2Tm xnkrNFntZE4kiwZizZk/3OW4KJPYsVqY4LoaBxIX0gzrZMsbahMf5Jp9A/x/MA== Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 48Jvpx57kFz2yjY; Fri, 14 Feb 2020 13:48:25 +0000 (UTC) Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail01.haj.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 48Jvpw4vtSz2xmc for ; Fri, 14 Feb 2020 13:48:24 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (Client did not present a certificate) by mail01.ipfire.org (Postfix) with ESMTPSA id 48Jvpw313Yzv9; Fri, 14 Feb 2020 13:48:24 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=201909ed25519; t=1581688104; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=eP1Pz2AlVw9tr4pz+1UqIhCgv6UHymhQEt8VBtxuycs=; b=4d14HD+Rwnp6+uGybBC6uNcG+IpWjAzh+i7af2VldG3QR/AdSKwOymDOkxGy2GO6pkyQxe Kl6hGJ0bzmXQ9rDQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=201909rsa; t=1581688104; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=eP1Pz2AlVw9tr4pz+1UqIhCgv6UHymhQEt8VBtxuycs=; b=V3zzJcb2tP683P3BBK4pG2UA+Zen01gyWbG2V3XlHDFUMGfxW2bGZd9nPKM3a0WHRTXhJf mbkDyFrtR+g4A7ZQjHeshMbnKlAFsEMBdLmnkFUC1zvuq52WxyESUfNRJQ+jPO+EHzXBSo zMLFHLAmK5yL/lw4DFe09ZR+LRKCZgskpdDl3eDIyxbVR3aMov3pzZhoHvTBpar68G1rnr s2VnFfr5KElIRx0oW4dGnDbbcvVDnv3AvGp9GJWM13GrwBgtoJ5IsjAejHL3/eVSksnf4h UVTqNH7n0TWKdMDj0+Hgojk/IQkJuB117A6Rd22QNtbdGCuJqhZZEoCxW54MXQ== 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> References: <20200214134819.23170-1-michael.tremer@ipfire.org> MIME-Version: 1.0 X-BeenThere: development@lists.ipfire.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: IPFire development talk List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Michael Tremer Errors-To: development-bounces@lists.ipfire.org Sender: "Development" 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 --- config/udev/network-hotplug-bridges | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/config/udev/network-hotplug-bridges b/config/udev/network-hotplug-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 + 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}"