summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2021-03-25 08:57:31 +0100
committerChristian Poessinger <christian@poessinger.com>2021-03-25 08:57:31 +0100
commit7c4f620a60af8ef4fddbb8efa5c07eaf9ee54d30 (patch)
tree37010823d912c20ec161019f882d058aa5ffb56c /templates
parentdceff61a0b20b7c348ec2f0a12b7f983936210e8 (diff)
downloadvyatta-cfg-quagga-7c4f620a60af8ef4fddbb8efa5c07eaf9ee54d30.tar.gz
vyatta-cfg-quagga-7c4f620a60af8ef4fddbb8efa5c07eaf9ee54d30.zip
vrf: T2111: bugfix leaking to default routing table
Commit db38bdcc55 ("vrf: T2111: validate existence of target VRF when leaking") validated the existance for a target VRF, but did not allow hte default VRF. This has been adjusted to support leaking to the default/global routing instance.
Diffstat (limited to 'templates')
-rw-r--r--templates/protocols/vrf/node.tag/static/interface-route/node.tag/next-hop-interface/node.tag/next-hop-vrf/node.def2
-rw-r--r--templates/protocols/vrf/node.tag/static/interface-route6/node.tag/next-hop-interface/node.def2
-rw-r--r--templates/protocols/vrf/node.tag/static/route/node.tag/next-hop/node.tag/next-hop-vrf/node.def2
-rw-r--r--templates/protocols/vrf/node.tag/static/route6/node.tag/next-hop/node.def2
4 files changed, 4 insertions, 4 deletions
diff --git a/templates/protocols/vrf/node.tag/static/interface-route/node.tag/next-hop-interface/node.tag/next-hop-vrf/node.def b/templates/protocols/vrf/node.tag/static/interface-route/node.tag/next-hop-interface/node.tag/next-hop-vrf/node.def
index 8c157906..da20f231 100644
--- a/templates/protocols/vrf/node.tag/static/interface-route/node.tag/next-hop-interface/node.tag/next-hop-vrf/node.def
+++ b/templates/protocols/vrf/node.tag/static/interface-route/node.tag/next-hop-interface/node.tag/next-hop-vrf/node.def
@@ -6,7 +6,7 @@ allowed: local -a params
echo -n "${params[@]}"
val_help: <vrf> ; Name of VRF to leak to
end:
- if [ ! -e /sys/class/net/$VAR(@) ]; then
+ if [ ! -e /sys/class/net/$VAR(@) ] && [ $VAR(@) != "default" ]; then
echo 'VRF "$VAR(@)" does not exist!'
exit 1
fi
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 e2deadb2..bf406bb0 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
@@ -24,7 +24,7 @@ end:
fi
if [[ -n "$VAR(./next-hop-vrf/@)" ]]; then
NEXTHOP_VRF="nexthop-vrf $VAR(./next-hop-vrf/@)"
- if [ ! -e /sys/class/net/$NEXTHOP_VRF ]; then
+ if [ ! -e /sys/class/net/$NEXTHOP_VRF ] && [ $NEXTHOP_VRF != "default" ]; then
echo 'VRF "$NEXTHOP_VRF" does not exist!'
exit 1
fi
diff --git a/templates/protocols/vrf/node.tag/static/route/node.tag/next-hop/node.tag/next-hop-vrf/node.def b/templates/protocols/vrf/node.tag/static/route/node.tag/next-hop/node.tag/next-hop-vrf/node.def
index b2624cd7..c67fe1c4 100644
--- a/templates/protocols/vrf/node.tag/static/route/node.tag/next-hop/node.tag/next-hop-vrf/node.def
+++ b/templates/protocols/vrf/node.tag/static/route/node.tag/next-hop/node.tag/next-hop-vrf/node.def
@@ -6,7 +6,7 @@ allowed: local -a params
echo -n "${params[@]}"
val_help: <vrf> ; Name of VRF to leak to
end:
- if [ ! -e /sys/class/net/$VAR(@) ]; then
+ if [ ! -e /sys/class/net/$VAR(@) ] && [ $VAR(@) != "default" ]; then
echo 'VRF "$VAR(@)" does not exist!'
exit 1
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 044f2689..1c45d0c1 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
@@ -41,7 +41,7 @@ end:
exit 1
fi
NEXTHOP_VRF="nexthop-vrf $VAR(./next-hop-vrf/@)"
- if [ ! -e /sys/class/net/$NEXTHOP_VRF ]; then
+ if [ ! -e /sys/class/net/$NEXTHOP_VRF ] && [ $NEXTHOP_VRF != "default" ]; then
echo 'VRF "$NEXTHOP_VRF" does not exist!'
exit 1
fi