summaryrefslogtreecommitdiff
path: root/templates/protocols/static/route
diff options
context:
space:
mode:
authorsever-sever <v.gletenko@vyos.io>2020-11-28 16:11:24 +0000
committersever-sever <v.gletenko@vyos.io>2020-11-28 16:11:24 +0000
commitdb2f0bbeb375e0d568ef4740bad2b50690cd8644 (patch)
treef7064a687674cebb053ac60347e5e548d8cea45c /templates/protocols/static/route
parentbb294a0f502cd5c92ec5d118c45c5fa7761c010a (diff)
downloadvyatta-cfg-quagga-db2f0bbeb375e0d568ef4740bad2b50690cd8644.tar.gz
vyatta-cfg-quagga-db2f0bbeb375e0d568ef4740bad2b50690cd8644.zip
op-mode: T3091: Add option tag for blackhole static routes
Diffstat (limited to 'templates/protocols/static/route')
-rw-r--r--templates/protocols/static/route/node.tag/blackhole/node.def14
-rw-r--r--templates/protocols/static/route/node.tag/blackhole/tag/node.def4
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