From c317fda4786d93e9cdf94deb1e52c5d581360b7e Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Fri, 16 Jul 2010 14:51:13 -0700 Subject: Add syntax validation for bridge STP parameters The syntax range for bridge STP values was missing or incorrect. Bug 5864 --- templates/interfaces/bonding/node.tag/bridge-group/cost/node.def | 6 ++---- .../interfaces/bonding/node.tag/bridge-group/priority/node.def | 8 +++----- .../bonding/node.tag/vif/node.tag/bridge-group/cost/node.def | 6 ++---- .../bonding/node.tag/vif/node.tag/bridge-group/priority/node.def | 8 +++----- 4 files changed, 10 insertions(+), 18 deletions(-) (limited to 'templates/interfaces/bonding') diff --git a/templates/interfaces/bonding/node.tag/bridge-group/cost/node.def b/templates/interfaces/bonding/node.tag/bridge-group/cost/node.def index f90f4769..33763624 100644 --- a/templates/interfaces/bonding/node.tag/bridge-group/cost/node.def +++ b/templates/interfaces/bonding/node.tag/bridge-group/cost/node.def @@ -1,6 +1,4 @@ type: u32 - help: Set the path cost for this port - -comp_help: possible completions: - <0-2147483647> Set port cost +syntax:expression: $VAR(@) >= 1 && $VAR(@) < 65536 ; "Bridge cost value must be between 1 and 65535" +val_help:<1-65535>; Path cost value for Spanning Tree Protocol diff --git a/templates/interfaces/bonding/node.tag/bridge-group/priority/node.def b/templates/interfaces/bonding/node.tag/bridge-group/priority/node.def index 5c11ec4f..d7a2f7a0 100644 --- a/templates/interfaces/bonding/node.tag/bridge-group/priority/node.def +++ b/templates/interfaces/bonding/node.tag/bridge-group/priority/node.def @@ -1,6 +1,4 @@ type: u32 - -help: Set the path priority for this port - -comp_help: possible completions: - <0-255> Set port priority +help: Set the port priority for this port +syntax:expression: $VAR(@) >= 0 &&$VAR(@) <= 255; "Port priority must be between 1-255" +val_help:<1-255>; Bridge port priority diff --git a/templates/interfaces/bonding/node.tag/vif/node.tag/bridge-group/cost/node.def b/templates/interfaces/bonding/node.tag/vif/node.tag/bridge-group/cost/node.def index f90f4769..33763624 100644 --- a/templates/interfaces/bonding/node.tag/vif/node.tag/bridge-group/cost/node.def +++ b/templates/interfaces/bonding/node.tag/vif/node.tag/bridge-group/cost/node.def @@ -1,6 +1,4 @@ type: u32 - help: Set the path cost for this port - -comp_help: possible completions: - <0-2147483647> Set port cost +syntax:expression: $VAR(@) >= 1 && $VAR(@) < 65536 ; "Bridge cost value must be between 1 and 65535" +val_help:<1-65535>; Path cost value for Spanning Tree Protocol diff --git a/templates/interfaces/bonding/node.tag/vif/node.tag/bridge-group/priority/node.def b/templates/interfaces/bonding/node.tag/vif/node.tag/bridge-group/priority/node.def index 5c11ec4f..d7a2f7a0 100644 --- a/templates/interfaces/bonding/node.tag/vif/node.tag/bridge-group/priority/node.def +++ b/templates/interfaces/bonding/node.tag/vif/node.tag/bridge-group/priority/node.def @@ -1,6 +1,4 @@ type: u32 - -help: Set the path priority for this port - -comp_help: possible completions: - <0-255> Set port priority +help: Set the port priority for this port +syntax:expression: $VAR(@) >= 0 &&$VAR(@) <= 255; "Port priority must be between 1-255" +val_help:<1-255>; Bridge port priority -- cgit v1.2.3