summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Hemminger <stephen.hemminger@vyatta.com>2010-01-25 15:41:27 -0800
committerStephen Hemminger <stephen.hemminger@vyatta.com>2010-01-25 16:29:50 -0800
commitaba26326537cca5b689e5a32f860608d2a9f8510 (patch)
tree02e5d49c6260c75ac9be617d374032209eb4635d
parent3aa4462d6d2d4a5b7d5c41dd3edb5c799bca63a4 (diff)
downloadvyatta-cfg-quagga-aba26326537cca5b689e5a32f860608d2a9f8510.tar.gz
vyatta-cfg-quagga-aba26326537cca5b689e5a32f860608d2a9f8510.zip
Fix set community additive
additive is a prefix to other values, ie. "additive internet" not a separate value. The value will need to be quoted (Bug 4376) Fixing the syntax correctly is too hard (requires new node type).
-rw-r--r--templates/policy/route-map/node.tag/rule/node.tag/set/community/node.def21
1 files changed, 12 insertions, 9 deletions
diff --git a/templates/policy/route-map/node.tag/rule/node.tag/set/community/node.def b/templates/policy/route-map/node.tag/rule/node.tag/set/community/node.def
index c7643436..d03bfc81 100644
--- a/templates/policy/route-map/node.tag/rule/node.tag/set/community/node.def
+++ b/templates/policy/route-map/node.tag/rule/node.tag/set/community/node.def
@@ -1,20 +1,23 @@
type: txt
help: Set the Border Gateway Protocl (BGP) community attribute
-comp_help: \1 <AA:NN>\t\tcommunity in 4 octet AS:value format
- additive\t\tcommunities are appended to existing community string
- internet\t\tsymbolic Internet community 0
+comp_help: \1 <AA:NN>\tcommunity in 4 octet AS:value format
local-AS\t\tadvertise communities in local AS only (NO_EXPORT_SUBCONFED)
no-advertise\tdon't advertise this route to any peer (NO_ADVERTISE)
no-export\t\tdon't advertise outside of this AS of confederation boundry (NO_EXPORT)
+ internet\t\tsymbolic Internet community 0
+ The above maybe prefixed by "additive "
+
+allowed:echo "none local-AS no-advertise no-export internet"
-allowed:echo "none local-AS no-advertise no-export internet additive"
+syntax:expression: pattern $VAR(@) \
+ "^(additive )?([0-9]+:[0-9]+|none|local-AS|no-advertise|no-export|internet)$" \
+ ; "\"$VAR(@)\" unknown community string or attribute"
-syntax:expression: pattern $VAR(@) "^[[:digit:]]+:[[:digit:]]+$" \
- || $VAR(@) in "none","local-AS","no-advertise","no-export","internet","additive" \
- ; "$VAR(@): Unknown community string or attribute"
+syntax:expression: "$VAR(@)" != "additive none" \
+ ; "\"additive none\" is meaningless"
-commit:expression: $VAR(../../action/) != ""; \
- "policy route-map $VAR(../../../@) rule $VAR(../../@): You must specify an action"
+commit:expression: $VAR(../../action/) != "" \
+ ; "policy route-map $VAR(../../../@) rule $VAR(../../@): You must specify an action"
update: vyatta-vtysh -c "configure terminal" \
-c "route-map $VAR(../../../@) $VAR(../../action/@) $VAR(../../@)" \