From c1f9398f095be9b82ac6077ccb792d12fe1d8c80 Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Tue, 31 Mar 2009 14:05:59 -0700 Subject: Set forwarding-delay when STP is enabled If using STP then apply configured forwarding-delay or 15 if none specified. --- templates/interfaces/bridge/node.tag/stp/node.def | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'templates') 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 -- cgit v1.2.3