diff options
Diffstat (limited to 'templates/policy')
-rw-r--r-- | templates/policy/route-map/node.tag/rule/node.tag/match/community/node.def | 10 | ||||
-rw-r--r-- | templates/policy/route-map/node.tag/rule/node.tag/set/comm-list/comm-list/node.def | 2 |
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" |