diff options
author | John Southworth <john.southworth@vyatta.com> | 2011-06-17 14:19:51 -0500 |
---|---|---|
committer | John Southworth <john.southworth@vyatta.com> | 2011-06-17 14:19:51 -0500 |
commit | cc04866fe7589bcdeafd0b8f9babcd5e4d8b7597 (patch) | |
tree | 473e341a7e65eefc6b16d24f33d515550663794d /templates/protocols/static/interface-route6 | |
parent | f0219bd5420d182aa53cd323815de510c676782e (diff) | |
download | vyatta-cfg-quagga-cc04866fe7589bcdeafd0b8f9babcd5e4d8b7597.tar.gz vyatta-cfg-quagga-cc04866fe7589bcdeafd0b8f9babcd5e4d8b7597.zip |
Bugfix 6816: Verify that at least one next-hop exists if the parent node for the route still exists
Diffstat (limited to 'templates/protocols/static/interface-route6')
-rw-r--r-- | templates/protocols/static/interface-route6/node.tag/next-hop-interface/node.def | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/templates/protocols/static/interface-route6/node.tag/next-hop-interface/node.def b/templates/protocols/static/interface-route6/node.tag/next-hop-interface/node.def index 1a5e6709..84e619cc 100644 --- a/templates/protocols/static/interface-route6/node.tag/next-hop-interface/node.def +++ b/templates/protocols/static/interface-route6/node.tag/next-hop-interface/node.def @@ -10,6 +10,16 @@ end: then if [[ ${COMMIT_ACTION} = 'DELETE' ]] then + # Check that there is still a next-hop-interface if the parent is not deleted + ARR=( $(cli-shell-api listNodes protocols static interface-route6 $VAR(../@) next-hop-interface) ) + cli-shell-api exists protocols static interface-route6 $VAR(../@) + RETVAL_PARENT=$? + if [ ${#ARR} -eq 0 ] && [ $RETVAL_PARENT -eq 0 ] + then + echo "Must add a next-hop-interface for route $VAR(../@)" + exit 1 + fi + vtysh -c "configure terminal" \ -c "no ipv6 route $VAR(../@) $VAR(@)" else |