diff options
author | hagbard <vyosdev@derith.de> | 2019-03-13 15:22:50 -0700 |
---|---|---|
committer | hagbard <vyosdev@derith.de> | 2019-03-13 15:22:50 -0700 |
commit | b05d70e9070b53292551739860fe21ef144c8ae6 (patch) | |
tree | 33a7a8b1fcb7e2900310b649dd1333aad95064c8 /templates | |
parent | 3e5aa2a7871b6b0e3e2f40938127af91d946e9fc (diff) | |
download | vyatta-cfg-quagga-b05d70e9070b53292551739860fe21ef144c8ae6.tar.gz vyatta-cfg-quagga-b05d70e9070b53292551739860fe21ef144c8ae6.zip |
[frr] T1267: Add interface name for static routes
Diffstat (limited to 'templates')
-rw-r--r-- | templates/protocols/static/route/node.tag/next-hop/node.def | 10 | ||||
-rw-r--r-- | templates/protocols/static/route/node.tag/next-hop/node.tag/next-hop-interface/node.def | 3 |
2 files changed, 10 insertions, 3 deletions
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" |