summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to 'templates')
-rw-r--r--templates/protocols/static/route6/node.tag/next-hop/node.def4
-rw-r--r--templates/protocols/vrf/node.tag/static/route6/node.tag/next-hop/node.def6
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