diff options
author | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2008-02-05 16:50:33 -0800 |
---|---|---|
committer | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2008-02-05 16:50:33 -0800 |
commit | cbea4bffaf8ee64229db7624d63e47427c43d664 (patch) | |
tree | 6c54314dcc4e7989d7c2213729b4630092d30459 | |
parent | 25da013b77ac8037b72db34d0ecbe6cf081c0e20 (diff) | |
download | vyatta-cfg-qos-cbea4bffaf8ee64229db7624d63e47427c43d664.tar.gz vyatta-cfg-qos-cbea4bffaf8ee64229db7624d63e47427c43d664.zip |
make sure regex for matching percentage are anchored
This fixes problem where 80%x and x12% would be matched.
4 files changed, 4 insertions, 4 deletions
diff --git a/templates/qos-policy/traffic-shaper/node.tag/class/node.tag/ceiling/node.def b/templates/qos-policy/traffic-shaper/node.tag/class/node.tag/ceiling/node.def index a82414a..f20191b 100644 --- a/templates/qos-policy/traffic-shaper/node.tag/class/node.tag/ceiling/node.def +++ b/templates/qos-policy/traffic-shaper/node.tag/class/node.tag/ceiling/node.def @@ -1,4 +1,4 @@ type: txt help: Set the limit for this class -syntax:expression: exec "[[ \"$VAR(@)\" =~ \"[0-9]+(\.[0-9]*)?%\" ]] || \ +syntax:expression: exec "[[ \"$VAR(@)\" =~ '^[0-9]+(\.[0-9]*)?%$' ]] || \ /opt/vyatta/sbin/vyatta-qos-util.pl --rate \"$VAR(@)\"" diff --git a/templates/qos-policy/traffic-shaper/node.tag/class/node.tag/rate/node.def b/templates/qos-policy/traffic-shaper/node.tag/class/node.tag/rate/node.def index 35d7b1d..94fdd42 100644 --- a/templates/qos-policy/traffic-shaper/node.tag/class/node.tag/rate/node.def +++ b/templates/qos-policy/traffic-shaper/node.tag/class/node.tag/rate/node.def @@ -1,7 +1,7 @@ type: txt default: "100%" help: Set the base rate for this class -syntax:expression: exec "[[ \"$VAR(@)\" =~ \"[0-9]+(\.[0-9]*)?%\" ]] || \ +syntax:expression: exec "[[ \"$VAR(@)\" =~ '^[0-9]+(\.[0-9]*)?%$' ]] || \ /opt/vyatta/sbin/vyatta-qos-util.pl --rate \"$VAR(@)\"" comp_help: Allowed values: <number>% Percentage of overall rate (default 100%) diff --git a/templates/qos-policy/traffic-shaper/node.tag/default/ceiling/node.def b/templates/qos-policy/traffic-shaper/node.tag/default/ceiling/node.def index dff4a89..a72de5d 100644 --- a/templates/qos-policy/traffic-shaper/node.tag/default/ceiling/node.def +++ b/templates/qos-policy/traffic-shaper/node.tag/default/ceiling/node.def @@ -1,6 +1,6 @@ type: txt help: Set the limit for default traffic default: "100%" -syntax:expression: exec "[[ \"$VAR(@)\" =~ \"[0-9]+(\.[0-9]*)?%\" ]] || \ +syntax:expression: exec "[[ \"$VAR(@)\" =~ '^[0-9]+(\.[0-9]*)?%$' ]] || \ /opt/vyatta/sbin/vyatta-qos-util.pl --rate \"$VAR(@)\"" diff --git a/templates/qos-policy/traffic-shaper/node.tag/default/rate/node.def b/templates/qos-policy/traffic-shaper/node.tag/default/rate/node.def index 9463038..b206332 100644 --- a/templates/qos-policy/traffic-shaper/node.tag/default/rate/node.def +++ b/templates/qos-policy/traffic-shaper/node.tag/default/rate/node.def @@ -1,7 +1,7 @@ type: txt default: "50%" help: Set the rate for default traffic -syntax:expression: exec "[[ \"$VAR(@)\" =~ \"[0-9]+(\.[0-9]*)?%\" ]] || \ +syntax:expression: exec "[[ \"$VAR(@)\" =~ '^[0-9]+(\.[0-9]*)?%$' ]] || \ /opt/vyatta/sbin/vyatta-qos-util.pl --rate \"$VAR(@)\"" comp_help: Allowed values: <number>% Percentage of overall rate (default 50%) |