From f8bf19c92e8b99b097754847f85cc17509135731 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Daniel=20Weism=C3=BCller?= Date: Thu, 19 Nov 2020 14:18:49 +0100 Subject: [PATCH] Core 152: the script "network-hotplug-bridges" now reads the variable ${ZONE}_STP from /var/ipfire/ethernet/settings so that STP can be turned on and off for each bridge MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Daniel Weismüller Signed-off-by: Michael Tremer --- config/udev/network-hotplug-bridges | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/config/udev/network-hotplug-bridges b/config/udev/network-hotplug-bridges index 33d6d65ba5..7431377bbe 100644 --- a/config/udev/network-hotplug-bridges +++ b/config/udev/network-hotplug-bridges @@ -81,6 +81,7 @@ MODE="$(get_value "${ZONE}_MODE")" # The name of the virtual bridge BRIDGE="$(get_value "${ZONE}_DEV")" +STP="$(get_value "${ZONE}_STP")" case "${MODE}" in bridge) @@ -89,7 +90,8 @@ case "${MODE}" in # 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 + ip link add "${BRIDGE}" address "${ADDRESS}" type bridge \ + $([ "${STP}" = "on" ] && echo "stp_state 1") #ip link set "${BRIDGE}" up fi -- 2.39.2