summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStig Thormodsrud <stig@vyatta.com>2010-02-12 16:07:05 -0800
committerStig Thormodsrud <stig@vyatta.com>2010-02-12 16:07:05 -0800
commita706b940d65eb07e1a5c419f5242551f5563a3b0 (patch)
tree576723a369bc9cff9908a796cca9ad017b23c1fe
parentba252d598619e12b100378d7afd9056014a3607a (diff)
downloadvyatta-cfg-quagga-a706b940d65eb07e1a5c419f5242551f5563a3b0.tar.gz
vyatta-cfg-quagga-a706b940d65eb07e1a5c419f5242551f5563a3b0.zip
Fix 4161: Bad config handling of "procotols ospf passive-interface".
-rw-r--r--templates/protocols/ospf/passive-interface-exclude/node.def24
1 files changed, 24 insertions, 0 deletions
diff --git a/templates/protocols/ospf/passive-interface-exclude/node.def b/templates/protocols/ospf/passive-interface-exclude/node.def
new file mode 100644
index 00000000..98820945
--- /dev/null
+++ b/templates/protocols/ospf/passive-interface-exclude/node.def
@@ -0,0 +1,24 @@
+multi:
+type: txt
+help: Set interface to exclude when using 'passive-interface default'
+
+allowed: ${vyatta_sbindir}/vyatta-interfaces.pl --show all
+
+syntax:expression: $VAR(../passive-interface/@) == "default"; \
+ "passive-interface-excluded can only be used with 'passive-interface default'"
+
+commit:expression: exec "/opt/vyatta/sbin/vyatta-interfaces.pl --dev=$VAR(@) --warn"
+
+create: if [ -z $VAR(@) ] ; then
+ echo "Error: must include interface";
+ exit 1;
+ else
+ vyatta-vtysh -c "configure terminal" -c "router ospf" \
+ -c "no passive-interface $VAR(@)"
+ fi;
+
+delete: vyatta-vtysh -c "configure terminal" -c "router ospf" \
+ -c "passive-interface $VAR(@)";
+
+comp_help: possible completions:
+ <interface> Set an interface to exclude from 'passive-interface default'