diff options
author | Christian Poessinger <christian@poessinger.com> | 2020-03-30 15:20:54 +0200 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2020-03-30 15:27:09 +0200 |
commit | c42197603dcd2498ae583f625c805355d41868ae (patch) | |
tree | 91c8f172f805ffe1e0bca48b2e10e93b766fea80 /templates | |
parent | 1d5ee87e1dabe83d2e9c8fa13e4a0fb83709ba72 (diff) | |
download | vyatta-cfg-quagga-c42197603dcd2498ae583f625c805355d41868ae.tar.gz vyatta-cfg-quagga-c42197603dcd2498ae583f625c805355d41868ae.zip |
vrf: T2170: IPv6 route-leaking requires a next-hop interface
... in the destination VRF, else routes won't get added into table.
Diffstat (limited to 'templates')
-rw-r--r-- | templates/protocols/static/route6/node.tag/next-hop/node.def | 4 | ||||
-rw-r--r-- | templates/protocols/vrf/node.tag/static/route6/node.tag/next-hop/node.def | 6 |
2 files changed, 9 insertions, 1 deletions
diff --git a/templates/protocols/static/route6/node.tag/next-hop/node.def b/templates/protocols/static/route6/node.tag/next-hop/node.def index 7db15b34..35a98a9f 100644 --- a/templates/protocols/static/route6/node.tag/next-hop/node.def +++ b/templates/protocols/static/route6/node.tag/next-hop/node.def @@ -29,6 +29,10 @@ end: fi if [[ -n "$VAR(./next-hop-vrf/@)" ]]; then + if [ -z "$VAR(./interface/@)" ]; then + echo "VRF route-leaking requires a next-hop interface to be set in the destination VRF" + exit 1 + fi NEXTHOP_VRF="nexthop-vrf $VAR(./next-hop-vrf/@)" fi diff --git a/templates/protocols/vrf/node.tag/static/route6/node.tag/next-hop/node.def b/templates/protocols/vrf/node.tag/static/route6/node.tag/next-hop/node.def index 0a320525..f7c63d70 100644 --- a/templates/protocols/vrf/node.tag/static/route6/node.tag/next-hop/node.def +++ b/templates/protocols/vrf/node.tag/static/route6/node.tag/next-hop/node.def @@ -31,6 +31,10 @@ end: fi if [[ -n "$VAR(./next-hop-vrf/@)" ]]; then + if [ -z "$VAR(./interface/@)" ]; then + echo "VRF route-leaking requires a next-hop interface to be set in the destination VRF" + exit 1 + fi NEXTHOP_VRF="nexthop-vrf $VAR(./next-hop-vrf/@)" fi @@ -42,6 +46,6 @@ end: "$VAR(../@)" "$VAR(@)" then vtysh -c "configure terminal" \ - -c "no ipv6 route $VAR(../@) $VAR(@) vrf $VRF_NAME" + -c "no ipv6 route $VAR(../@) $VAR(@) vrf $VRF_NAME" fi fi |