summaryrefslogtreecommitdiff
path: root/templates/policy
diff options
context:
space:
mode:
authorRobert Bays <rbays@moresby.vyatta.com>2008-03-14 13:18:28 -0700
committerRobert Bays <rbays@moresby.vyatta.com>2008-03-14 13:18:28 -0700
commite1d0d9a781e5ccf7941809e8e75e607b2e9197c9 (patch)
tree2ca39d34bb4d249fa1e6751bb25f27d28c910b2b /templates/policy
parentd8fd1b99cac5302f42bf6e7fbea86e3be634b27d (diff)
downloadvyatta-cfg-quagga-e1d0d9a781e5ccf7941809e8e75e607b2e9197c9.tar.gz
vyatta-cfg-quagga-e1d0d9a781e5ccf7941809e8e75e607b2e9197c9.zip
fix for bugs 2725 and 2999
Diffstat (limited to 'templates/policy')
-rw-r--r--templates/policy/route-map/node.tag/rule/node.tag/match/community/node.def10
-rw-r--r--templates/policy/route-map/node.tag/rule/node.tag/set/comm-list/comm-list/node.def2
2 files changed, 9 insertions, 3 deletions
diff --git a/templates/policy/route-map/node.tag/rule/node.tag/match/community/node.def b/templates/policy/route-map/node.tag/rule/node.tag/match/community/node.def
index 84c2ca62..3ac8e05e 100644
--- a/templates/policy/route-map/node.tag/rule/node.tag/match/community/node.def
+++ b/templates/policy/route-map/node.tag/rule/node.tag/match/community/node.def
@@ -1,7 +1,7 @@
help: Match BGP community list
delete: echo route-map $VAR(../../../@) $VAR(../../action/@) $VAR(../../@) >> /tmp/delete-policy-route-map-$VAR(../../../@)-$VAR(../../@)-match-community.$PPID
## this will always return exact-match pending bug 2525 being fixed
-end: if [ -z "$VAR(./community-list/)" ]; then
+end: if [ -z "$VAR(./community-list/@)" ]; then
echo You must configure a community-list ;
exit 1 ;
fi ;
@@ -13,9 +13,15 @@ end: if [ -z "$VAR(./community-list/)" ]; then
else
routemap='route-map $VAR(../../../@) $VAR(../../action/@) $VAR(../../@)';
- if [ -n "$VAR(./exact-match/)" ]; then
+ # uncomment and replace the call to vyatta-check-typeless-node.pl pending bug 2525
+ #if [ -n "$VAR(./exact-match/)" ]; then
+ # cond="exact-match ";
+ #fi ;
+ ${vyatta_sbindir}/vyatta-check-typeless-node.pl "policy route-map $VAR(../../../@) rule $VAR(../../@) match community exact-match";
+ if [ $? -eq 0 ]; then
cond="exact-match ";
fi ;
+
${vyatta_sbindir}/vyatta-vtysh.pl -noerr -c "configure terminal" -c "$routemap " -c "no match community " ;
${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c "$routemap " -c "match community $VAR(./community-list/@) $cond" ;
fi
diff --git a/templates/policy/route-map/node.tag/rule/node.tag/set/comm-list/comm-list/node.def b/templates/policy/route-map/node.tag/rule/node.tag/set/comm-list/comm-list/node.def
index 5fd3eaae..eed327b9 100644
--- a/templates/policy/route-map/node.tag/rule/node.tag/set/comm-list/comm-list/node.def
+++ b/templates/policy/route-map/node.tag/rule/node.tag/set/comm-list/comm-list/node.def
@@ -1,3 +1,3 @@
-type: txt
+type: u32
help: Set BGP community list
commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy community-list $VAR(@)\""; "community list $VAR(@) does not exist"