From: Daniel Weismüller Date: Thu, 19 Nov 2020 13:18:49 +0000 (+0100) Subject: Core 152: the script "network-hotplug-bridges" now reads the variable ${ZONE}_STP... X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f8bf19c92e8b99b097754847f85cc17509135731;p=people%2Fms%2Fipfire-2.x.git 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 Signed-off-by: Daniel Weismüller Signed-off-by: Michael Tremer --- 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