]> git.ipfire.org Git - people/stevee/network.git/blobdiff - src/helpers/bridge-stp
device: Rewrite device_set_address
[people/stevee/network.git] / src / helpers / bridge-stp
old mode 100755 (executable)
new mode 100644 (file)
index 186f287..720324c
@@ -27,6 +27,9 @@ LOG_FACILITY=$(basename ${0})
 
 . /usr/lib/network/functions
 
+# Read network settings
+network_settings_read
+
 zone=${1}
 assert isset zone
 
@@ -39,8 +42,8 @@ if ! zone_exists ${zone}; then
        exit ${EXIT_KERNEL_STP}
 fi
 
-# Read zone configuration.
-zone_config_read ${zone}
+# Read zone settings
+zone_settings_read ${zone}
 
 # Make sure STP is enabled for this zone.
 assert enabled STP
@@ -63,7 +66,7 @@ case "${STP_MODE}" in
                # Do this after the bridge has been added.
                (
                        sleep 2
-                       stp_bridge_set_protocol ${bridge} ${STP_MODE}
+                       stp_bridge_set_protocol "${zone}" "${STP_MODE}"
                ) &
 
                # Tell mstpd that STP has to be enabled/disabled.