From patchwork Fri Feb 14 13:48:18 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Tremer X-Patchwork-Id: 2791 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 48Jvpz06Clz3wc8 for ; Fri, 14 Feb 2020 13:48:26 +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 48Jvpx4gXvzv9; 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=1581688105; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=qHVEEvVDlvwfvIextdudbhOODTWSGVKPfBpmB3D0cKo=; b=QEQSfIPSuHlNinX72YVK6i0PglLpYE78H1H2AUJ2NLYt81zGJUZSLdkbcTiiasG1rY0gmu zhXnDu+E0Jghz4Dg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=201909rsa; t=1581688105; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=qHVEEvVDlvwfvIextdudbhOODTWSGVKPfBpmB3D0cKo=; b=Ml2lUT+4htHnDp3K3MaXR8F/E/peCzXXVn1EbxUbPwdQ3zmvT1mb9aO53Sb3HI10JaWlN5 XlVPMwwpGpUGAPAAqHl/LVPIiyAKJDWl+0sB1Evdx5CXv5MsblVPIGrmC4wcZJc0z0LK05 L1804x1DkvFhE5rklNizTdwwI95/Wz/kkmvW7vwCojul4AT+z6wJ/y1cD5h/4iGDrgI/cv jwupoJZbHOX8pf+cuYF+Ky7YnIxb+OihwOGzbAM3BuLF7E4Q8ndWFR1iymvjHA/jEwrzkw HvqDPnauvIV5M6JHKwSSRNeaCfxPdhPbMfD+QDt/zgyauLMREQe1BWN73Q+t2w== Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 48Jvpx390Cz2yj5; 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 48Jvpw3zdhz2xj5 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 48Jvpw13PBzhc; Fri, 14 Feb 2020 13:48:24 +0000 (UTC) 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-transfer-encoding:content-transfer-encoding; bh=qHVEEvVDlvwfvIextdudbhOODTWSGVKPfBpmB3D0cKo=; b=RA4i184qrSdS6j6YXZHgcLnF1WSXsqyg3IIvUOK0THpUtKjf+q/zTYTAVaumkP0aCQCAVF +bg7NMHyRfNwNkpMtiPUWVf4jweec6q8wr/gSKnl0V7lBKYNb4YBIKluhQE+SiD5URXpcs /2MZcN+Ju41WlynGCsG3yzoxLQglt/U8eMC3HVqNyIZ3nZcQIXvl6ff/9S/aBXSES5fImz OCFNhlIkRnH7CdqUoa1L/cs9f4hcR6gw3xxLkRvhSyoqWnrnZ4ZRFJIrgUzSWneQjBS5i7 nlHTbcuizjGYuYM2rprByvOotTmfT7aO7AvR1GQaZnU27eBU8MxIAisGodAZbQ== 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-transfer-encoding:content-transfer-encoding; bh=qHVEEvVDlvwfvIextdudbhOODTWSGVKPfBpmB3D0cKo=; b=aEMAmzW1NfgUu404qXfWWBozFP5wR+qlD6hAwTtm09of+IL0pdo3r1RYzbDK27z7Agy6cr 6g9/STaNbiLb4KCg== From: Michael Tremer To: development@lists.ipfire.org Subject: [PATCH 1/2] udev: Add more logging to bridge hotplug script Date: Fri, 14 Feb 2020 13:48:18 +0000 Message-Id: <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" Signed-off-by: Michael Tremer --- config/udev/network-hotplug-bridges | 2 ++ 1 file changed, 2 insertions(+) diff --git a/config/udev/network-hotplug-bridges b/config/udev/network-hotplug-bridges index 5144a7712..30a671f04 100644 --- a/config/udev/network-hotplug-bridges +++ b/config/udev/network-hotplug-bridges @@ -72,6 +72,7 @@ ZONE=$(detect_zone) # Cannot proceed if we could not find a zone if [ -z "${ZONE}" ]; then + logger "Could not find a bridged zone for ${INTERFACE}" exit 0 fi @@ -93,6 +94,7 @@ case "${MODE}" in fi # Attach the physical device + logger "Attach ${INTERFACE} to ${BRIDGE}" ip link set dev "${INTERFACE}" master "${BRIDGE}" ip link set dev "${INTERFACE}" up ;; 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}"