]> git.ipfire.org Git - network.git/commitdiff
stp: Correctly set protocol version.
authorMichael Tremer <michael.tremer@ipfire.org>
Sun, 23 Sep 2012 19:43:15 +0000 (19:43 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Sun, 23 Sep 2012 19:43:15 +0000 (19:43 +0000)
functions.stp
helpers/bridge-stp

index a23d15fb80498e112d7c512943bc1900bef61be8..433fb34c8b888670531749d4092080d2029978d4 100644 (file)
@@ -107,7 +107,7 @@ function stp_bridge_set_protocol() {
                mode="${STP_DEFAULT_MODE}"
        fi
 
-       mstpctl setforcevers ${bridge} ${mode}
+       cmd mstpctl setforcevers ${bridge} ${mode}
        assert [ $? -eq 0 ]
 }
 
index fb8240f9cd7144f94b2dcbcbd9537e838d0ea84e..186f287af99284fa49cbfc0ece0756c7a6e994f6 100755 (executable)
@@ -59,6 +59,13 @@ case "${STP_MODE}" in
                        fi
                fi
 
+               # Set the right protocol that should be used.
+               # Do this after the bridge has been added.
+               (
+                       sleep 2
+                       stp_bridge_set_protocol ${bridge} ${STP_MODE}
+               ) &
+
                # Tell mstpd that STP has to be enabled/disabled.
                case "${action}" in
                        start)