summaryrefslogtreecommitdiff
path: root/templates/interfaces/bridge
diff options
context:
space:
mode:
authorStephen Hemminger <stephen.hemminger@vyatta.com>2009-03-31 14:05:59 -0700
committerStephen Hemminger <stephen.hemminger@vyatta.com>2009-03-31 14:05:59 -0700
commitc1f9398f095be9b82ac6077ccb792d12fe1d8c80 (patch)
treeecb997480868f4f8f63e1ad54865be871f0a2549 /templates/interfaces/bridge
parent303b4aa341d418da4c1e15a2bf7271028d6face7 (diff)
downloadvyatta-cfg-quagga-c1f9398f095be9b82ac6077ccb792d12fe1d8c80.tar.gz
vyatta-cfg-quagga-c1f9398f095be9b82ac6077ccb792d12fe1d8c80.zip
Set forwarding-delay when STP is enabled
If using STP then apply configured forwarding-delay or 15 if none specified.
Diffstat (limited to 'templates/interfaces/bridge')
-rw-r--r--templates/interfaces/bridge/node.tag/stp/node.def5
1 files changed, 5 insertions, 0 deletions
diff --git a/templates/interfaces/bridge/node.tag/stp/node.def b/templates/interfaces/bridge/node.tag/stp/node.def
index 4d2e31b5..6f25f0cc 100644
--- a/templates/interfaces/bridge/node.tag/stp/node.def
+++ b/templates/interfaces/bridge/node.tag/stp/node.def
@@ -2,6 +2,11 @@ type: bool
help: Enable spanning tree protocol
default: false
update: if [ "$VAR(@)" == "true" ]; then
+ if [ -z "$VAR(../../forwarding-delay)" ]; then
+ sudo brctl setfd $VAR(../@) 15
+ else
+ sudo brctl setfd $VAR(../@) $VAR(../../forwarding-delay)
+ fi
sudo brctl stp $VAR(../@) on
else
sudo brctl stp $VAR(../@) off