]> git.ipfire.org Git - network.git/commitdiff
Revert "stp: Remove function that switches protocols."
authorMichael Tremer <michael.tremer@ipfire.org>
Sun, 23 Sep 2012 19:38:48 +0000 (19:38 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Sun, 23 Sep 2012 19:38:48 +0000 (19:38 +0000)
This reverts commit 78570028ea72b1cb5ca28835f64057f3f030f02e.

functions.stp

index 806c7afd99f6456c9b887534883e0950d48d51c3..a23d15fb80498e112d7c512943bc1900bef61be8 100644 (file)
@@ -93,6 +93,24 @@ function stp_get_name() {
        return ${EXIT_OK}
 }
 
+function stp_bridge_set_protocol() {
+       local bridge=${1}
+       assert isset bridge
+
+       local mode=${2}
+       assert isset mode
+
+       if ! listmatch ${mode} ${STP_ALLOWED_MODES}; then
+               log WARNING "Unknown protocol version: ${mode}."
+               log WARNING "Using default mode."
+
+               mode="${STP_DEFAULT_MODE}"
+       fi
+
+       mstpctl setforcevers ${bridge} ${mode}
+       assert [ $? -eq 0 ]
+}
+
 function stp_bridge_get_protocol() {
        local bridge=${1}