summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to 'templates')
-rw-r--r--templates/protocols/static/table/node.tag/route6/node.tag/next-hop/node.def18
-rw-r--r--templates/protocols/static/table/node.tag/route6/node.tag/next-hop/node.tag/interface/node.def6
2 files changed, 22 insertions, 2 deletions
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
index 20514d0f..9d565d4b 100644
--- 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
@@ -11,6 +11,14 @@ end:
fi
if [[ -z "$VAR(./disable)" ]]
then
+ ### remove the old entry from frr first on an update
+ if [ ${COMMIT_ACTION} = 'ACTIVE' ]
+ then
+ OLD_IF=`cli-shell-api returnEffectiveValue protocols static $table route6 $VAR(../@) next-hop $VAR(@) interface`
+ vtysh -c "configure terminal" \
+ -c "no ipv6 route $VAR(../@) $VAR(@) $OLD_IF $VAR(./distance/@) $table";
+ fi
+
if [[ ${COMMIT_ACTION} = 'DELETE' ]]
then
if ! ${vyatta_sbindir}/vyatta-next-hop-check $VAR(../@) ipv6 address; then
@@ -19,8 +27,10 @@ end:
if ${vyatta_sbindir}/vyatta-gateway-static_route-check.pl \
"$VAR(../@)" "$VAR(@)"
then
+ DIST=`cli-shell-api returnEffectiveValue protocols static $table route6 $VAR(../@) next-hop $VAR(@) distance`
+ INTERFACE=`cli-shell-api returnEffectiveValue protocols static $table route6 $VAR(../@) next-hop $VAR(@) interface`
vtysh -c "configure terminal" \
- -c "no ipv6 route $VAR(../@) $VAR(@) $table"
+ -c "no ipv6 route $VAR(../@) $VAR(@) $INTERFACE $DIST $table";
fi
else
if [[ -n "$VAR(./distance/@)" ]]
@@ -28,8 +38,12 @@ end:
DIST="$VAR(./distance/@)"
fi
+ if [[ -n "$VAR(./interface/@)" ]]; then
+ INTERFACE="$VAR(./interface/@)"
+ fi
+
vtysh -c "configure terminal" \
- -c "ipv6 route $VAR(../@) $VAR(@) $table $DIST";
+ -c "ipv6 route $VAR(../@) $VAR(@) $INTERFACE $DIST $table";
fi
else
if ${vyatta_sbindir}/vyatta-gateway-static_route-check.pl \
diff --git a/templates/protocols/static/table/node.tag/route6/node.tag/next-hop/node.tag/interface/node.def b/templates/protocols/static/table/node.tag/route6/node.tag/next-hop/node.tag/interface/node.def
new file mode 100644
index 00000000..c8479a63
--- /dev/null
+++ b/templates/protocols/static/table/node.tag/route6/node.tag/next-hop/node.tag/interface/node.def
@@ -0,0 +1,6 @@
+type: txt
+help: IPv6 gateway interface name
+# show all current interface
+# but syntax accepts any interface since it may exist later (ppp etc)
+allowed: ${vyatta_sbindir}/vyatta-interfaces.pl --show all
+