summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--templates/protocols/static/table/node.tag/interface-route6/node.def7
-rw-r--r--templates/protocols/static/table/node.tag/interface-route6/node.tag/next-hop-interface/node.def34
-rw-r--r--templates/protocols/static/table/node.tag/interface-route6/node.tag/next-hop-interface/node.tag/disable/node.def1
-rw-r--r--templates/protocols/static/table/node.tag/interface-route6/node.tag/next-hop-interface/node.tag/distance/node.def4
-rw-r--r--templates/protocols/static/table/node.tag/route6/node.def7
-rw-r--r--templates/protocols/static/table/node.tag/route6/node.tag/blackhole/distance/node.def4
-rw-r--r--templates/protocols/static/table/node.tag/route6/node.tag/blackhole/node.def21
-rw-r--r--templates/protocols/static/table/node.tag/route6/node.tag/next-hop/node.def41
-rw-r--r--templates/protocols/static/table/node.tag/route6/node.tag/next-hop/node.tag/disable/node.def1
-rw-r--r--templates/protocols/static/table/node.tag/route6/node.tag/next-hop/node.tag/distance/node.def4
10 files changed, 124 insertions, 0 deletions
diff --git a/templates/protocols/static/table/node.tag/interface-route6/node.def b/templates/protocols/static/table/node.tag/interface-route6/node.def
new file mode 100644
index 00000000..0015e601
--- /dev/null
+++ b/templates/protocols/static/table/node.tag/interface-route6/node.def
@@ -0,0 +1,7 @@
+tag:
+type: ipv6net
+help: Interface based IPv6 static route
+syntax:expression: exec "${vyatta_sbindir}/check_prefix_boundary $VAR(@)"
+
+commit:expression: $VAR(./next-hop-interface/) != "" ; \
+ "Must add a next-hop-interface for route $VAR(@)"
diff --git a/templates/protocols/static/table/node.tag/interface-route6/node.tag/next-hop-interface/node.def b/templates/protocols/static/table/node.tag/interface-route6/node.tag/next-hop-interface/node.def
new file mode 100644
index 00000000..60e75f78
--- /dev/null
+++ b/templates/protocols/static/table/node.tag/interface-route6/node.tag/next-hop-interface/node.def
@@ -0,0 +1,34 @@
+tag:
+type: txt
+help: Next-hop interface [REQUIRED]
+# show all current interface
+# but syntax accepts any interface since it may exist later (ppp etc)
+allowed: ${vyatta_sbindir}/vyatta-interfaces.pl --show all
+
+end:
+ if [[ -n "$VAR(../../../table/@)" ]]
+ then
+ table="table $VAR(../../../table/@)"
+ fi
+ if [[ -z "$VAR(./disable)" ]]
+ then
+ if [[ ${COMMIT_ACTION} = 'DELETE' ]]
+ then
+ if ! ${vyatta_sbindir}/vyatta-next-hop-check $VAR(../@) ipv6 interface; then
+ exit 1;
+ fi
+
+ vtysh -c "configure terminal" \
+ -c "no ipv6 route $VAR(../@) $VAR(@) $table"
+ else
+ if [[ -n "$VAR(./distance/@)" ]]
+ then
+ dist="$VAR(./distance/@)"
+ fi
+ vtysh -c "configure terminal" \
+ -c "ipv6 route $VAR(../@) $VAR(@) $table $dist";
+ fi
+ else
+ vtysh -c "configure terminal" \
+ -c "no ipv6 route $VAR(../@) $VAR(@) $table"
+ fi
diff --git a/templates/protocols/static/table/node.tag/interface-route6/node.tag/next-hop-interface/node.tag/disable/node.def b/templates/protocols/static/table/node.tag/interface-route6/node.tag/next-hop-interface/node.tag/disable/node.def
new file mode 100644
index 00000000..bc4b57e6
--- /dev/null
+++ b/templates/protocols/static/table/node.tag/interface-route6/node.tag/next-hop-interface/node.tag/disable/node.def
@@ -0,0 +1 @@
+help: Disable IPv6 interface static route
diff --git a/templates/protocols/static/table/node.tag/interface-route6/node.tag/next-hop-interface/node.tag/distance/node.def b/templates/protocols/static/table/node.tag/interface-route6/node.tag/next-hop-interface/node.tag/distance/node.def
new file mode 100644
index 00000000..61abcc65
--- /dev/null
+++ b/templates/protocols/static/table/node.tag/interface-route6/node.tag/next-hop-interface/node.tag/distance/node.def
@@ -0,0 +1,4 @@
+type: u32
+help: Distance value for this route
+syntax:expression: $VAR(@) >= 1 && $VAR(@) <= 255; "Must be between (1-255)"
+val_help: u32:1-255; Distance for this route
diff --git a/templates/protocols/static/table/node.tag/route6/node.def b/templates/protocols/static/table/node.tag/route6/node.def
new file mode 100644
index 00000000..de3f1cd8
--- /dev/null
+++ b/templates/protocols/static/table/node.tag/route6/node.def
@@ -0,0 +1,7 @@
+tag:
+type: ipv6net
+help: Static IPv6 route
+syntax:expression: exec "${vyatta_sbindir}/check_prefix_boundary $VAR(@)"
+
+commit:expression: $VAR(./next-hop/) != "" || $VAR(./blackhole/) != ""; \
+ "Must add either a next-hop or blackhole for route $VAR(@)"
diff --git a/templates/protocols/static/table/node.tag/route6/node.tag/blackhole/distance/node.def b/templates/protocols/static/table/node.tag/route6/node.tag/blackhole/distance/node.def
new file mode 100644
index 00000000..61abcc65
--- /dev/null
+++ b/templates/protocols/static/table/node.tag/route6/node.tag/blackhole/distance/node.def
@@ -0,0 +1,4 @@
+type: u32
+help: Distance value for this route
+syntax:expression: $VAR(@) >= 1 && $VAR(@) <= 255; "Must be between (1-255)"
+val_help: u32:1-255; Distance for this route
diff --git a/templates/protocols/static/table/node.tag/route6/node.tag/blackhole/node.def b/templates/protocols/static/table/node.tag/route6/node.tag/blackhole/node.def
new file mode 100644
index 00000000..a4d3fe8a
--- /dev/null
+++ b/templates/protocols/static/table/node.tag/route6/node.tag/blackhole/node.def
@@ -0,0 +1,21 @@
+help: Silently discard pkts when matched
+
+end:
+ if [[ -n "$VAR(../../../table/@)" ]]
+ then
+ table="table $VAR(../../../table/@)"
+ fi
+ if [ ${COMMIT_ACTION} = 'DELETE' ]; then
+ if ! ${vyatta_sbindir}/vyatta-next-hop-check $VAR(../@) ipv6 address; then
+ exit 1;
+ fi
+
+ vtysh -c "configure terminal" \
+ -c "no ipv6 route $VAR(../@) null0 $table";
+ else
+ if [ -n "$VAR(./distance/@)" ]; then
+ dist="$VAR(./distance/@)";
+ fi;
+ vtysh -c "configure terminal" \
+ -c "ipv6 route $VAR(../@) null0 $table $dist";
+ fi;
diff --git a/templates/protocols/static/table/node.tag/route6/node.tag/next-hop/node.def b/templates/protocols/static/table/node.tag/route6/node.tag/next-hop/node.def
new file mode 100644
index 00000000..20514d0f
--- /dev/null
+++ b/templates/protocols/static/table/node.tag/route6/node.tag/next-hop/node.def
@@ -0,0 +1,41 @@
+tag:
+
+type: ipv6
+
+help: Next-hop IPv6 router [REQUIRED]
+
+end:
+ if [[ -n "$VAR(../../../table/@)" ]]
+ then
+ table="table $VAR(../../../table/@)"
+ fi
+ if [[ -z "$VAR(./disable)" ]]
+ then
+ if [[ ${COMMIT_ACTION} = 'DELETE' ]]
+ then
+ if ! ${vyatta_sbindir}/vyatta-next-hop-check $VAR(../@) ipv6 address; then
+ exit 1;
+ fi
+ if ${vyatta_sbindir}/vyatta-gateway-static_route-check.pl \
+ "$VAR(../@)" "$VAR(@)"
+ then
+ vtysh -c "configure terminal" \
+ -c "no ipv6 route $VAR(../@) $VAR(@) $table"
+ fi
+ else
+ if [[ -n "$VAR(./distance/@)" ]]
+ then
+ DIST="$VAR(./distance/@)"
+ fi
+
+ vtysh -c "configure terminal" \
+ -c "ipv6 route $VAR(../@) $VAR(@) $table $DIST";
+ fi
+ else
+ if ${vyatta_sbindir}/vyatta-gateway-static_route-check.pl \
+ "$VAR(../@)" "$VAR(@)"
+ then
+ vtysh -c "configure terminal" \
+ -c "no ipv6 route $VAR(../@) $VAR(@) $table"
+ fi
+ fi
diff --git a/templates/protocols/static/table/node.tag/route6/node.tag/next-hop/node.tag/disable/node.def b/templates/protocols/static/table/node.tag/route6/node.tag/next-hop/node.tag/disable/node.def
new file mode 100644
index 00000000..a71e3c24
--- /dev/null
+++ b/templates/protocols/static/table/node.tag/route6/node.tag/next-hop/node.tag/disable/node.def
@@ -0,0 +1 @@
+help: Disable IPv6 next-hop static route
diff --git a/templates/protocols/static/table/node.tag/route6/node.tag/next-hop/node.tag/distance/node.def b/templates/protocols/static/table/node.tag/route6/node.tag/next-hop/node.tag/distance/node.def
new file mode 100644
index 00000000..61abcc65
--- /dev/null
+++ b/templates/protocols/static/table/node.tag/route6/node.tag/next-hop/node.tag/distance/node.def
@@ -0,0 +1,4 @@
+type: u32
+help: Distance value for this route
+syntax:expression: $VAR(@) >= 1 && $VAR(@) <= 255; "Must be between (1-255)"
+val_help: u32:1-255; Distance for this route