From 6f681b67bf633688e2434817db369f13934fd07d Mon Sep 17 00:00:00 2001 From: hagbard Date: Wed, 20 Mar 2019 11:34:29 -0700 Subject: [frr] T1267 - route deletion with next-hop-interface fixed --- .../node.tag/next-hop/node.tag/next-hop-interface/node.def | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'templates') diff --git a/templates/protocols/static/route/node.tag/next-hop/node.tag/next-hop-interface/node.def b/templates/protocols/static/route/node.tag/next-hop/node.tag/next-hop-interface/node.def index ad045d40..17979d4b 100644 --- a/templates/protocols/static/route/node.tag/next-hop/node.tag/next-hop-interface/node.def +++ b/templates/protocols/static/route/node.tag/next-hop/node.tag/next-hop-interface/node.def @@ -1,3 +1,16 @@ type: txt help: network interface allowed: sh -c "${vyos_completion_dir}/list_interfaces.py" +end: + if [[ ${COMMIT_ACTION} = 'DELETE' ]] + then + if ! ${vyatta_sbindir}/vyatta-next-hop-check $VAR(../@) ipv4 address; then + exit 1; + fi + if ${vyatta_sbindir}/vyatta-gateway-static_route-check.pl \ + "$VAR(../../@)" "$VAR(../@)" + then + vtysh -c "configure terminal" \ + -c "no ip route $VAR(../../@) $VAR(../@) $VAR(@)" + fi + fi -- cgit v1.2.3