]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/commitdiff
Core 152: the script "network-hotplug-bridges" now reads the variable ${ZONE}_STP...
authorDaniel Weismüller <daniel.weismueller@ipfire.org>
Thu, 19 Nov 2020 13:18:49 +0000 (14:18 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Fri, 20 Nov 2020 13:46:27 +0000 (13:46 +0000)
Signed-off-by: Daniel Weismüller <daniel.weismueller@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
config/udev/network-hotplug-bridges

index 33d6d65ba558aa6137d585d155aee0dc42e41b08..7431377bbe18f38db38897657cd185f89d0ea2ae 100644 (file)
@@ -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