From b05d70e9070b53292551739860fe21ef144c8ae6 Mon Sep 17 00:00:00 2001 From: hagbard Date: Wed, 13 Mar 2019 15:22:50 -0700 Subject: [frr] T1267: Add interface name for static routes --- templates/protocols/static/route/node.tag/next-hop/node.def | 10 +++++++--- .../node.tag/next-hop/node.tag/next-hop-interface/node.def | 3 +++ 2 files changed, 10 insertions(+), 3 deletions(-) create mode 100644 templates/protocols/static/route/node.tag/next-hop/node.tag/next-hop-interface/node.def diff --git a/templates/protocols/static/route/node.tag/next-hop/node.def b/templates/protocols/static/route/node.tag/next-hop/node.def index e5106b02..0c98eb5f 100644 --- a/templates/protocols/static/route/node.tag/next-hop/node.def +++ b/templates/protocols/static/route/node.tag/next-hop/node.def @@ -18,10 +18,14 @@ end: else if [[ -n "$VAR(./distance/@)" ]] then - DIST="$VAR(./distance/@)" + DIST="$VAR(./distance/@)" fi - vtysh -c "configure terminal" \ - -c "ip route $VAR(../@) $VAR(@) $DIST"; + if [[ -n "$VAR(./next-hop-interface/@)" ]] + then + NHINT="$VAR(./next-hop-interface/@)" + fi + vtysh -c "configure terminal" \ + -c "ip route $VAR(../@) $VAR(@) $NHINT $DIST"; fi else if ${vyatta_sbindir}/vyatta-gateway-static_route-check.pl \ 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 new file mode 100644 index 00000000..ad045d40 --- /dev/null +++ b/templates/protocols/static/route/node.tag/next-hop/node.tag/next-hop-interface/node.def @@ -0,0 +1,3 @@ +type: txt +help: network interface +allowed: sh -c "${vyos_completion_dir}/list_interfaces.py" -- cgit v1.2.3