diff options
author | hagbard <vyosdev@derith.de> | 2019-03-20 11:34:29 -0700 |
---|---|---|
committer | hagbard <vyosdev@derith.de> | 2019-03-20 11:34:29 -0700 |
commit | 6f681b67bf633688e2434817db369f13934fd07d (patch) | |
tree | 189a62c48084729d5d221e909ea6a670d244af9a /templates/protocols/static | |
parent | 3c16076fcf92b90cf18f00f784815261e6cdad45 (diff) | |
download | vyatta-cfg-quagga-6f681b67bf633688e2434817db369f13934fd07d.tar.gz vyatta-cfg-quagga-6f681b67bf633688e2434817db369f13934fd07d.zip |
[frr] T1267 - route deletion with next-hop-interface fixed
Diffstat (limited to 'templates/protocols/static')
-rw-r--r-- | templates/protocols/static/route/node.tag/next-hop/node.tag/next-hop-interface/node.def | 13 |
1 files changed, 13 insertions, 0 deletions
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 |