From patchwork Fri Nov 20 17:35:52 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Weismueller X-Patchwork-Id: 3672 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) server-digest SHA384 client-signature ECDSA (P-384) client-digest SHA384) (Client CN "mail01.haj.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 4Cd3dJ2lVrz3wg9 for ; Fri, 20 Nov 2020 17:36:52 +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) client-signature ECDSA (P-384)) (Client CN "mail02.haj.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4Cd3dH0y91zty; Fri, 20 Nov 2020 17:36:51 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4Cd3dG1Q44z2xbW; Fri, 20 Nov 2020 17:36:50 +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) server-digest SHA384 client-signature ECDSA (P-384) client-digest SHA384) (Client CN "mail01.haj.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4Cd3dD3CHvz2xbW for ; Fri, 20 Nov 2020 17:36:48 +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) (No client certificate requested) by mail01.ipfire.org (Postfix) with ESMTPSA id 4Cd3d74R9TzDs; Fri, 20 Nov 2020 17:36:43 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1605893803; 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; bh=8+x1KmpR5t/Uje5rL8eMTujOV3UZrME2ikjk2xbLZVQ=; b=hE7Nl8SZRSobNqRkgQ8vjpL6NZnVl8Oihk96e2sZ2K5sxx6tsBW2ov3vyQt9mG9mFqCbq6 zpPTo65452j4yECg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1605893803; 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; bh=8+x1KmpR5t/Uje5rL8eMTujOV3UZrME2ikjk2xbLZVQ=; b=F8etGe4ciYY+BGwB/0cgyIUrdHtUil6Lc3shiKOOfa92SodrIXOZv0D8/LdAMdu+c8QN4H R53qao0ixT97awn9PYMiJSgz5o1hjTCuesFTgfvd1MrKRKRiHRJ7SBB8F2UFvn5Gcg0+RK 4UFe/+GqECp2rk/TP/J5LLpl9r4rcjE8y4dTH24XVyQmY7xnFX4jW5e/BjTR1MEoZTJ5R7 O6Kw/0z4Vm79gUl4yNqEzDJrR2tErJLqkcAHoTIrurPMMntW35msmoV+olH3o8KfntmJBr KRB1ptXvXd9OgtvmR2zgNum60lKa7t58MYqVz37vMTBfiW2ZqJJ9Z4QeNF06Ng== From: =?utf-8?q?Daniel_Weism=C3=BCller?= To: development@lists.ipfire.org Subject: [PATCH] =?utf-8?q?Core_152=3A_the_script_=22network-hotplug-bridges?= =?utf-8?q?=22_now_reads_the_variable_=24=7BZONE=7D=5FSTP=5FPRIORITY_from_/v?= =?utf-8?q?ar/ipfire/ethernet/settings_so_that_the_priority_can_be_adjusted_?= =?utf-8?q?Signed-off-by=3A_Daniel_Weism=C3=BCller_=3Cdaniel=2Eweismueller?= =?utf-8?q?=40ipfire=2Eorg=3E?= Date: Fri, 20 Nov 2020 18:35:52 +0100 Message-Id: <20201120173551.4722-1-daniel.weismueller@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: , Errors-To: development-bounces@lists.ipfire.org Sender: "Development" --- config/udev/network-hotplug-bridges | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/config/udev/network-hotplug-bridges b/config/udev/network-hotplug-bridges index 7431377bb..77330b114 100644 --- a/config/udev/network-hotplug-bridges +++ b/config/udev/network-hotplug-bridges @@ -82,16 +82,22 @@ MODE="$(get_value "${ZONE}_MODE")" # The name of the virtual bridge BRIDGE="$(get_value "${ZONE}_DEV")" STP="$(get_value "${ZONE}_STP")" +STP_PRIORITY="$(get_value "${ZONE}_STP_PRIORITY")" case "${MODE}" in bridge) + # We need to check if $STP_PRIORITY has a valid value if not set it + if [ -n "${STP_PRIORITY}" ]; then + STP_PRIORITY=16384; + fi + ADDRESS="$(get_value "${ZONE}_MACADDR")" [ -n "${ADDRESS}" ] || ADDRESS="$(random_mac_address)" # We need to create the bridge if it doesn't exist, yet if [ ! -d "/sys/class/net/${BRIDGE}" ]; then ip link add "${BRIDGE}" address "${ADDRESS}" type bridge \ - $([ "${STP}" = "on" ] && echo "stp_state 1") + $([ "${STP}" = "on" ] && echo "stp_state 1 priority ${STP_PRIORITY}" ) #ip link set "${BRIDGE}" up fi