summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStig Thormodsrud <stig@vyatta.com>2007-12-11 16:08:08 -0800
committerStig Thormodsrud <stig@vyatta.com>2007-12-11 16:08:08 -0800
commit51e5d904b6a51ed07a0eaeda12c1d15c1f6a8c0a (patch)
tree161b023e58cda903adc0bd3a66e218d2cc6a7bb6
parent6a58c1175a40d3afcb3ca7164852465011cfd544 (diff)
downloadvyatta-cfg-quagga-51e5d904b6a51ed07a0eaeda12c1d15c1f6a8c0a.tar.gz
vyatta-cfg-quagga-51e5d904b6a51ed07a0eaeda12c1d15c1f6a8c0a.zip
Implement "rip distribute-list".
-rw-r--r--templates/protocols/rip/distribute-list/access-list/in/node.def8
-rw-r--r--templates/protocols/rip/distribute-list/access-list/node.def1
-rw-r--r--templates/protocols/rip/distribute-list/access-list/out/node.def8
-rw-r--r--templates/protocols/rip/distribute-list/in/node.def8
-rw-r--r--templates/protocols/rip/distribute-list/interface/node.def10
-rw-r--r--templates/protocols/rip/distribute-list/interface/node.tag/access-list/in/node.def8
-rw-r--r--templates/protocols/rip/distribute-list/interface/node.tag/access-list/node.def1
-rw-r--r--templates/protocols/rip/distribute-list/interface/node.tag/access-list/out/node.def7
-rw-r--r--templates/protocols/rip/distribute-list/interface/node.tag/prefix-list/in/node.def7
-rw-r--r--templates/protocols/rip/distribute-list/interface/node.tag/prefix-list/node.def1
-rw-r--r--templates/protocols/rip/distribute-list/interface/node.tag/prefix-list/out/node.def7
-rw-r--r--templates/protocols/rip/distribute-list/node.def3
-rw-r--r--templates/protocols/rip/distribute-list/out/node.def7
-rw-r--r--templates/protocols/rip/distribute-list/prefix-list/in/node.def8
-rw-r--r--templates/protocols/rip/distribute-list/prefix-list/node.def1
-rw-r--r--templates/protocols/rip/distribute-list/prefix-list/out/node.def7
16 files changed, 76 insertions, 16 deletions
diff --git a/templates/protocols/rip/distribute-list/access-list/in/node.def b/templates/protocols/rip/distribute-list/access-list/in/node.def
new file mode 100644
index 00000000..c7ab7852
--- /dev/null
+++ b/templates/protocols/rip/distribute-list/access-list/in/node.def
@@ -0,0 +1,8 @@
+type: u32
+help: "access-list to apply to input packets"
+commit: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy access-list $(@)\" ";"access-list $(@) doesn't exist"
+update: "/usr/bin/vtysh -c \"configure terminal\" -c \"router rip\" \
+ -c \"distribute-list $(@) in\" "
+delete: "/usr/bin/vtysh -c \"configure terminal\" -c \"router rip\" \
+ -c \"no distribute-list $(@) in\" "
+
diff --git a/templates/protocols/rip/distribute-list/access-list/node.def b/templates/protocols/rip/distribute-list/access-list/node.def
new file mode 100644
index 00000000..a76ae356
--- /dev/null
+++ b/templates/protocols/rip/distribute-list/access-list/node.def
@@ -0,0 +1 @@
+help: "Access-list"
diff --git a/templates/protocols/rip/distribute-list/access-list/out/node.def b/templates/protocols/rip/distribute-list/access-list/out/node.def
new file mode 100644
index 00000000..5612375b
--- /dev/null
+++ b/templates/protocols/rip/distribute-list/access-list/out/node.def
@@ -0,0 +1,8 @@
+type: u32
+help: "access-list to apply to output packets"
+commit: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy access-list $(@)\" ";"access-list $(@) doesn't exist"
+update: "/usr/bin/vtysh -c \"configure terminal\" -c \"router rip\" \
+ -c \"distribute-list $(@) out\" "
+delete: "/usr/bin/vtysh -c \"configure terminal\" -c \"router rip\" \
+ -c \"no distribute-list $(@) out\" "
+
diff --git a/templates/protocols/rip/distribute-list/in/node.def b/templates/protocols/rip/distribute-list/in/node.def
deleted file mode 100644
index 83b31f9c..00000000
--- a/templates/protocols/rip/distribute-list/in/node.def
+++ /dev/null
@@ -1,8 +0,0 @@
-type: u32
-help: "ACL to be used in redistribution"
-commit: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy access-list $(@)\" ";"access-list $(@) doesn't exist"
-create: "/usr/bin/vtysh -c \"configure terminal\" -c \"router rip\" \
- -c \"distribute-list $(@) $(../@) $(../../../@)\" "
-delete: "/usr/bin/vtysh -c \"configure terminal\" -c \"router rip\" \
- -c \"no distribute-list $(@) $(../@) $(../../../@)\" "
-
diff --git a/templates/protocols/rip/distribute-list/interface/node.def b/templates/protocols/rip/distribute-list/interface/node.def
new file mode 100644
index 00000000..ce00fdc9
--- /dev/null
+++ b/templates/protocols/rip/distribute-list/interface/node.def
@@ -0,0 +1,10 @@
+tag:
+type: txt
+help: "Apply filtering to an interface"
+syntax: exec "if [ -z \"`ip addr | grep $(@) `\" ]; then \
+ echo ethernet interface $(@) doesn\\'t exist on this system ; \
+ exit 1 ; \
+ fi ; "
+#allowed: local -a array;
+# array=( /sys/class/net/{eth,vmnet}* ) ;
+# echo -n ${array[@]##*/}
diff --git a/templates/protocols/rip/distribute-list/interface/node.tag/access-list/in/node.def b/templates/protocols/rip/distribute-list/interface/node.tag/access-list/in/node.def
new file mode 100644
index 00000000..e5f88e61
--- /dev/null
+++ b/templates/protocols/rip/distribute-list/interface/node.tag/access-list/in/node.def
@@ -0,0 +1,8 @@
+type: u32
+help: "access-list to apply to input packets"
+commit: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy access-list $(@)\" ";"access-list $(@) doesn't exist"
+update: "/usr/bin/vtysh -c \"configure terminal\" -c \"router rip\" \
+ -c \"distribute-list $(@) in $(../../@)\" "
+delete: "/usr/bin/vtysh -c \"configure terminal\" -c \"router rip\" \
+ -c \"no distribute-list $(@) in $(../../@)\" "
+
diff --git a/templates/protocols/rip/distribute-list/interface/node.tag/access-list/node.def b/templates/protocols/rip/distribute-list/interface/node.tag/access-list/node.def
new file mode 100644
index 00000000..a76ae356
--- /dev/null
+++ b/templates/protocols/rip/distribute-list/interface/node.tag/access-list/node.def
@@ -0,0 +1 @@
+help: "Access-list"
diff --git a/templates/protocols/rip/distribute-list/interface/node.tag/access-list/out/node.def b/templates/protocols/rip/distribute-list/interface/node.tag/access-list/out/node.def
new file mode 100644
index 00000000..ce719a73
--- /dev/null
+++ b/templates/protocols/rip/distribute-list/interface/node.tag/access-list/out/node.def
@@ -0,0 +1,7 @@
+type: u32
+help: "access-list to apply to output packets"
+commit: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy access-list $(@)\" ";"access-list $(@) doesn't exist"
+update: "/usr/bin/vtysh -c \"configure terminal\" -c \"router rip\" \
+ -c \"distribute-list $(@) out $(../../@) \" "
+delete: "/usr/bin/vtysh -c \"configure terminal\" -c \"router rip\" \
+ -c \"no distribute-list $(@) out $(../../@) \" "
diff --git a/templates/protocols/rip/distribute-list/interface/node.tag/prefix-list/in/node.def b/templates/protocols/rip/distribute-list/interface/node.tag/prefix-list/in/node.def
new file mode 100644
index 00000000..844aa91a
--- /dev/null
+++ b/templates/protocols/rip/distribute-list/interface/node.tag/prefix-list/in/node.def
@@ -0,0 +1,7 @@
+type: txt
+help: "prefix-list to apply to input packets"
+commit: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy prefix-list $(@)\" ";"prefix-list $(@) doesn't exist"
+update: "/usr/bin/vtysh -c \"configure terminal\" -c \"router rip\" \
+ -c \"distribute-list prefix $(@) in $(../../@) \" "
+delete: "/usr/bin/vtysh -c \"configure terminal\" -c \"router rip\" \
+ -c \"no distribute-list prefix $(@) in $(../../@) \" "
diff --git a/templates/protocols/rip/distribute-list/interface/node.tag/prefix-list/node.def b/templates/protocols/rip/distribute-list/interface/node.tag/prefix-list/node.def
new file mode 100644
index 00000000..f30db7e7
--- /dev/null
+++ b/templates/protocols/rip/distribute-list/interface/node.tag/prefix-list/node.def
@@ -0,0 +1 @@
+help: "Prefix-list"
diff --git a/templates/protocols/rip/distribute-list/interface/node.tag/prefix-list/out/node.def b/templates/protocols/rip/distribute-list/interface/node.tag/prefix-list/out/node.def
new file mode 100644
index 00000000..c82f34df
--- /dev/null
+++ b/templates/protocols/rip/distribute-list/interface/node.tag/prefix-list/out/node.def
@@ -0,0 +1,7 @@
+type: txt
+help: "prefix-list to apply to output packets"
+commit: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy prefix-list $(@)\" ";"prefix-list $(@) doesn't exist"
+update: "/usr/bin/vtysh -c \"configure terminal\" -c \"router rip\" \
+ -c \"distribute-list prefix $(@) out $(../../@) \" "
+delete: "/usr/bin/vtysh -c \"configure terminal\" -c \"router rip\" \
+ -c \"no distribute-list prefix $(@) out $(../../@)\" "
diff --git a/templates/protocols/rip/distribute-list/node.def b/templates/protocols/rip/distribute-list/node.def
index 59eacb5a..89d561fe 100644
--- a/templates/protocols/rip/distribute-list/node.def
+++ b/templates/protocols/rip/distribute-list/node.def
@@ -1 +1,2 @@
-help: "Direction of redistribution"
+help: "Filter networks in routing updates"
+
diff --git a/templates/protocols/rip/distribute-list/out/node.def b/templates/protocols/rip/distribute-list/out/node.def
deleted file mode 100644
index 0e7ea992..00000000
--- a/templates/protocols/rip/distribute-list/out/node.def
+++ /dev/null
@@ -1,7 +0,0 @@
-type: u32
-help: "ACL to be used in redistribution"
-commit: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy access-list $(@)\" ";"access-list $(@) doesn't exist"
-create: "/usr/bin/vtysh -c \"configure terminal\" -c \"router rip\" \
- -c \"distribute-list $(@) $(../@) $(../../../@)\" "
-delete: "/usr/bin/vtysh -c \"configure terminal\" -c \"router rip\" \
- -c \"no distribute-list $(@) $(../@) $(../../../@)\" "
diff --git a/templates/protocols/rip/distribute-list/prefix-list/in/node.def b/templates/protocols/rip/distribute-list/prefix-list/in/node.def
new file mode 100644
index 00000000..98271556
--- /dev/null
+++ b/templates/protocols/rip/distribute-list/prefix-list/in/node.def
@@ -0,0 +1,8 @@
+type: txt
+help: "prefix-list to apply to input packets"
+commit: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy prefix-list $(@)\" ";"prefix-list $(@) doesn't exist"
+update: "/usr/bin/vtysh -c \"configure terminal\" -c \"router rip\" \
+ -c \"distribute-list prefix $(@) in\" "
+delete: "/usr/bin/vtysh -c \"configure terminal\" -c \"router rip\" \
+ -c \"no distribute-list prefix $(@) in\" "
+
diff --git a/templates/protocols/rip/distribute-list/prefix-list/node.def b/templates/protocols/rip/distribute-list/prefix-list/node.def
new file mode 100644
index 00000000..f30db7e7
--- /dev/null
+++ b/templates/protocols/rip/distribute-list/prefix-list/node.def
@@ -0,0 +1 @@
+help: "Prefix-list"
diff --git a/templates/protocols/rip/distribute-list/prefix-list/out/node.def b/templates/protocols/rip/distribute-list/prefix-list/out/node.def
new file mode 100644
index 00000000..89dd3ff4
--- /dev/null
+++ b/templates/protocols/rip/distribute-list/prefix-list/out/node.def
@@ -0,0 +1,7 @@
+type: txt
+help: "prefix-list to apply to output packets"
+commit: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy prefix-list $(@)\" ";"prefix-list $(@) doesn't exist"
+update: "/usr/bin/vtysh -c \"configure terminal\" -c \"router rip\" \
+ -c \"distribute-list prefix $(@) out\" "
+delete: "/usr/bin/vtysh -c \"configure terminal\" -c \"router rip\" \
+ -c \"no distribute-list prefix $(@) out\" "