diff options
author | Daniil Baturin <daniil@baturin.org> | 2018-12-26 07:42:14 +0100 |
---|---|---|
committer | Daniil Baturin <daniil@baturin.org> | 2018-12-26 07:42:14 +0100 |
commit | 6ec5b7dbe9154d252e39409b186c083aa272d76e (patch) | |
tree | 81e8b3dc3786db25708bb5fc0b07bb344ea5eb49 /templates/policy/route-map | |
parent | 49c5431359719c7949dd82515b3c321600434292 (diff) | |
download | vyatta-cfg-quagga-6ec5b7dbe9154d252e39409b186c083aa272d76e.tar.gz vyatta-cfg-quagga-6ec5b7dbe9154d252e39409b186c083aa272d76e.zip |
T1138: disallow "set comm-list" statements without "delete" option
and allow named community lists there.
Diffstat (limited to 'templates/policy/route-map')
-rw-r--r-- | templates/policy/route-map/node.tag/rule/node.tag/set/comm-list/comm-list/node.def | 5 | ||||
-rw-r--r-- | templates/policy/route-map/node.tag/rule/node.tag/set/comm-list/node.def | 4 |
2 files changed, 6 insertions, 3 deletions
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 474528d6..a9d5b02e 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,6 +1,5 @@ -type: u32 +type: txt help: BGP communities with a community-list -val_help: u32:1-99; BGP community list (standard) -val_help: u32:100-500; BGP community list (expanded) +allowed: cli-shell-api listNodes policy community-list commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy community-list $VAR(@)\""; "community list $VAR(@) does not exist" diff --git a/templates/policy/route-map/node.tag/rule/node.tag/set/comm-list/node.def b/templates/policy/route-map/node.tag/rule/node.tag/set/comm-list/node.def index 2438ee51..90b22ba4 100644 --- a/templates/policy/route-map/node.tag/rule/node.tag/set/comm-list/node.def +++ b/templates/policy/route-map/node.tag/rule/node.tag/set/comm-list/node.def @@ -12,6 +12,10 @@ end: exit 1 ; fi ; + if [ -z "$VAR(./delete/)" ]; then + echo "set comm-list requires the delete option now" ; + exit 1 ; + fi ; # uncomment this when 2525 is fixed and comment out the subsequent call #if [ -n "$VAR(./delete/)" ]; then |