summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2020-03-30 15:54:49 +0200
committerChristian Poessinger <christian@poessinger.com>2020-03-30 15:54:49 +0200
commita753e52319bd44602fd991dc8ade5fce9f4dc12b (patch)
tree8a94475caedd10ad328d12aba22f55f53d494f61
parentecf92a312574a06dba476b5c67ef2b564159b32a (diff)
downloadvyatta-cfg-quagga-a753e52319bd44602fd991dc8ade5fce9f4dc12b.tar.gz
vyatta-cfg-quagga-a753e52319bd44602fd991dc8ade5fce9f4dc12b.zip
vrf: T2170: IPv6 support route-leaking on interface routes
-rw-r--r--templates/protocols/vrf/node.tag/static/interface-route6/node.tag/next-hop-interface/node.def16
-rw-r--r--templates/protocols/vrf/node.tag/static/interface-route6/node.tag/next-hop-interface/node.tag/next-hop-vrf/node.def7
2 files changed, 18 insertions, 5 deletions
diff --git a/templates/protocols/vrf/node.tag/static/interface-route6/node.tag/next-hop-interface/node.def b/templates/protocols/vrf/node.tag/static/interface-route6/node.tag/next-hop-interface/node.def
index 03cf2257..52f198b1 100644
--- a/templates/protocols/vrf/node.tag/static/interface-route6/node.tag/next-hop-interface/node.def
+++ b/templates/protocols/vrf/node.tag/static/interface-route6/node.tag/next-hop-interface/node.def
@@ -16,16 +16,22 @@ end:
fi
vtysh -c "configure terminal" \
- -c "no ipv6 route $VAR(../@) $VAR(@) vrf $VRF_NAME"
+ -c "vrf $VRF_NAME" \
+ -c "no ipv6 route $VAR(../@) $VAR(@)"
else
- if [[ -n "$VAR(./distance/@)" ]]
- then
+ if [[ -n "$VAR(./distance/@)" ]]; then
DIST="$VAR(./distance/@)"
fi
+ if [[ -n "$VAR(./next-hop-vrf/@)" ]]; then
+ NEXTHOP_VRF="nexthop-vrf $VAR(./next-hop-vrf/@)"
+ fi
+
vtysh -c "configure terminal" \
- -c "ipv6 route $VAR(../@) $VAR(@) vrf $VRF_NAME $DIST";
+ -c "vrf $VRF_NAME" \
+ -c "ipv6 route $VAR(../@) $VAR(@) $NEXTHOP_VRF $DIST";
fi
else
vtysh -c "configure terminal" \
- -c "no ipv6 route $VAR(../@) vrf $VRF_NAME $VAR(@)"
+ -c "vrf $VRF_NAME" \
+ -c "no ipv6 route $VAR(../@) $VAR(@)"
fi
diff --git a/templates/protocols/vrf/node.tag/static/interface-route6/node.tag/next-hop-interface/node.tag/next-hop-vrf/node.def b/templates/protocols/vrf/node.tag/static/interface-route6/node.tag/next-hop-interface/node.tag/next-hop-vrf/node.def
new file mode 100644
index 00000000..7eee837e
--- /dev/null
+++ b/templates/protocols/vrf/node.tag/static/interface-route6/node.tag/next-hop-interface/node.tag/next-hop-vrf/node.def
@@ -0,0 +1,7 @@
+type: txt
+help: VRF to leak route
+allowed: local -a params
+ params=('default')
+ eval "params+=($(cli-shell-api listNodes vrf name))"
+ echo -n "${params[@]}"
+val_help: <vrf> ; Name of VRF to leak to