summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2020-01-23 21:25:43 +0100
committerChristian Poessinger <christian@poessinger.com>2020-01-23 21:25:43 +0100
commit5a1060a21dbc478c1aaaa4711e66bc882eeae114 (patch)
treef274e5c69257237be27eb556d74d2010ff953c9a
parentea7bb52603153af6c2ba000062c429490d60cd19 (diff)
downloadvyatta-cfg-quagga-5a1060a21dbc478c1aaaa4711e66bc882eeae114.tar.gz
vyatta-cfg-quagga-5a1060a21dbc478c1aaaa4711e66bc882eeae114.zip
bgp: T1902: support redistribution of non-main routing table
-rw-r--r--templates/protocols/bgp/node.tag/address-family/ipv4-unicast/redistribute/table/node.def10
1 files changed, 10 insertions, 0 deletions
diff --git a/templates/protocols/bgp/node.tag/address-family/ipv4-unicast/redistribute/table/node.def b/templates/protocols/bgp/node.tag/address-family/ipv4-unicast/redistribute/table/node.def
new file mode 100644
index 00000000..7aae952e
--- /dev/null
+++ b/templates/protocols/bgp/node.tag/address-family/ipv4-unicast/redistribute/table/node.def
@@ -0,0 +1,10 @@
+multi:
+type: txt
+help: Redistribute non-main Kernel Routing Table
+allowed: local -a params
+ eval "params=($(cli-shell-api listNodes protocols static table))"
+ echo -n ${params[@]##*/}
+commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"protocols static table $VAR(@)\" ";"static table $VAR(@) doesn't exist"
+create:expression: "vtysh -c \"configure terminal\" -c \"router bgp $VAR(../../../../@)\" -c \"address-family ipv4\" -c \"redistribute table $VAR(@)\" "
+delete:expression: "vtysh -c \"configure terminal\" -c \"router bgp $VAR(../../../../@)\" -c \"address-family ipv4\" -c \"no redistribute table $VAR(@)\" "
+