summaryrefslogtreecommitdiff
path: root/templates/protocols/static/route6
diff options
context:
space:
mode:
Diffstat (limited to 'templates/protocols/static/route6')
-rw-r--r--templates/protocols/static/route6/node.def4
-rw-r--r--templates/protocols/static/route6/node.tag/blackhole/distance/node.def4
-rw-r--r--templates/protocols/static/route6/node.tag/blackhole/node.def11
-rw-r--r--templates/protocols/static/route6/node.tag/next-hop/node.def15
-rw-r--r--templates/protocols/static/route6/node.tag/next-hop/node.tag/distance/node.def4
-rw-r--r--templates/protocols/static/route6/node.tag/next-hop/node.tag/node.def2
-rw-r--r--templates/protocols/static/route6/node.tag/node.def3
7 files changed, 43 insertions, 0 deletions
diff --git a/templates/protocols/static/route6/node.def b/templates/protocols/static/route6/node.def
new file mode 100644
index 00000000..7f95d0be
--- /dev/null
+++ b/templates/protocols/static/route6/node.def
@@ -0,0 +1,4 @@
+tag:
+type: ipv6net
+help: Set a static IPv6 route
+syntax:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --check-prefix-boundry $VAR(@)"
diff --git a/templates/protocols/static/route6/node.tag/blackhole/distance/node.def b/templates/protocols/static/route6/node.tag/blackhole/distance/node.def
new file mode 100644
index 00000000..08a06ad8
--- /dev/null
+++ b/templates/protocols/static/route6/node.tag/blackhole/distance/node.def
@@ -0,0 +1,4 @@
+type: u32
+help: Set distance value for this route
+syntax:expression: $VAR(@) >= 1 && $VAR(@) <= 255; "Must be between (1-255)"
+comp_help: <1-255> Distance for this route
diff --git a/templates/protocols/static/route6/node.tag/blackhole/node.def b/templates/protocols/static/route6/node.tag/blackhole/node.def
new file mode 100644
index 00000000..aaeab5b6
--- /dev/null
+++ b/templates/protocols/static/route6/node.tag/blackhole/node.def
@@ -0,0 +1,11 @@
+help: Set to silently discard pkts when matched
+delete:expression: "touch /tmp/static.$PPID"
+end:expression: "if [ -f \"/tmp/static.$PPID\" ]; then \
+ ${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"no ip route $VAR(../@) null0\" ; \
+ rm /tmp/static.$PPID; \
+ else \
+ if [ -n \"$VAR(./distance/@)\" ]; then \
+ DIST=\"$VAR(./distance/@)\"; \
+ fi; \
+ ${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"ip route $VAR(../@) null0 $DIST \" ; \
+ fi; "
diff --git a/templates/protocols/static/route6/node.tag/next-hop/node.def b/templates/protocols/static/route6/node.tag/next-hop/node.def
new file mode 100644
index 00000000..d62088ce
--- /dev/null
+++ b/templates/protocols/static/route6/node.tag/next-hop/node.def
@@ -0,0 +1,15 @@
+tag:
+type: ipv6
+help: Set the next-hop IPv6 router
+delete: touch /tmp/static.$PPID
+end: if [ -f "/tmp/static.$PPID" ]; then
+ if ${vyatta_sbindir}/vyatta-gateway-static_route-check.pl "$VAR(../@)" "$VAR(@)"; then
+ ${vyatta_sbindir}/vyatta-vtysh.pl -c "configure terminal" -c "no ipv6 route $VAR(../@) $VAR(@)" ;
+ fi;
+ rm /tmp/static.$PPID;
+ else
+ if [ -n "$VAR(./distance/@)" ]; then
+ DIST="$VAR(./distance/@)";
+ fi;
+ ${vyatta_sbindir}/vyatta-vtysh.pl -c "configure terminal" -c "ipv6 route $VAR(../@) $VAR(@) $DIST";
+ fi;
diff --git a/templates/protocols/static/route6/node.tag/next-hop/node.tag/distance/node.def b/templates/protocols/static/route6/node.tag/next-hop/node.tag/distance/node.def
new file mode 100644
index 00000000..08a06ad8
--- /dev/null
+++ b/templates/protocols/static/route6/node.tag/next-hop/node.tag/distance/node.def
@@ -0,0 +1,4 @@
+type: u32
+help: Set distance value for this route
+syntax:expression: $VAR(@) >= 1 && $VAR(@) <= 255; "Must be between (1-255)"
+comp_help: <1-255> Distance for this route
diff --git a/templates/protocols/static/route6/node.tag/next-hop/node.tag/node.def b/templates/protocols/static/route6/node.tag/next-hop/node.tag/node.def
new file mode 100644
index 00000000..08dff1a9
--- /dev/null
+++ b/templates/protocols/static/route6/node.tag/next-hop/node.tag/node.def
@@ -0,0 +1,2 @@
+help: Set next-hop router
+
diff --git a/templates/protocols/static/route6/node.tag/node.def b/templates/protocols/static/route6/node.tag/node.def
new file mode 100644
index 00000000..7e15c498
--- /dev/null
+++ b/templates/protocols/static/route6/node.tag/node.def
@@ -0,0 +1,3 @@
+help: Set IP network
+commit:expression: $VAR(./next-hop/) != "" || $VAR(./blackhole/) != ""; "Must add either a next-hop or blackhole for route $VAR(@)"
+