diff options
Diffstat (limited to 'templates/protocols/static/route')
-rw-r--r-- | templates/protocols/static/route/node.tag/blackhole/node.def | 14 | ||||
-rw-r--r-- | templates/protocols/static/route/node.tag/blackhole/tag/node.def | 4 |
2 files changed, 15 insertions, 3 deletions
diff --git a/templates/protocols/static/route/node.tag/blackhole/node.def b/templates/protocols/static/route/node.tag/blackhole/node.def index a7208dfa..b513e27b 100644 --- a/templates/protocols/static/route/node.tag/blackhole/node.def +++ b/templates/protocols/static/route/node.tag/blackhole/node.def @@ -9,8 +9,16 @@ end: if [ ${COMMIT_ACTION} = 'DELETE' ]; then -c "no ip route $VAR(../@) Null0"; else if [ -n "$VAR(./distance/@)" ]; then - DIST="$VAR(./distance/@)"; + DIST="$VAR(./distance/@)"; + fi + if [ -n "$VAR(./tag/@)" ]; then + TAG="$VAR(./tag/@)"; + fi; + if [[ -z $TAG ]]; then + vtysh -c "configure terminal" \ + -c "ip route $VAR(../@) Null0 $DIST"; + else + vtysh -c "configure terminal" \ + -c "ip route $VAR(../@) Null0 tag $TAG $DIST"; fi; - vtysh -c "configure terminal" \ - -c "ip route $VAR(../@) Null0 $DIST"; fi; diff --git a/templates/protocols/static/route/node.tag/blackhole/tag/node.def b/templates/protocols/static/route/node.tag/blackhole/tag/node.def new file mode 100644 index 00000000..778952ea --- /dev/null +++ b/templates/protocols/static/route/node.tag/blackhole/tag/node.def @@ -0,0 +1,4 @@ +type: u32 +help: Tag value for this route +syntax:expression: $VAR(@) >= 1 && $VAR(@) <= 4294967295; "Must be between (1-4294967295)" +val_help: u32:1-4294967295; Tag for this route |