summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to 'templates')
-rw-r--r--templates/interfaces/loopback/node.tag/ip/ospf/network/node.def9
-rw-r--r--templates/protocols/bgp/node.tag/neighbor/node.tag/attribute-unchanged/node.def26
-rw-r--r--templates/protocols/bgp/node.tag/neighbor/node.tag/local-as/local-as/node.def2
-rw-r--r--templates/protocols/bgp/node.tag/neighbor/node.tag/remote-as/node.def6
-rw-r--r--templates/protocols/bgp/node.tag/parameters/dampening/node.def17
5 files changed, 33 insertions, 27 deletions
diff --git a/templates/interfaces/loopback/node.tag/ip/ospf/network/node.def b/templates/interfaces/loopback/node.tag/ip/ospf/network/node.def
index 74cb7719..1296ca18 100644
--- a/templates/interfaces/loopback/node.tag/ip/ospf/network/node.def
+++ b/templates/interfaces/loopback/node.tag/ip/ospf/network/node.def
@@ -1,7 +1,9 @@
type: txt
help: Set network type
-syntax:expression: $VAR(@) in "broadcast", "non-broadcast", "point-to-multipoint", "point-to-point"; \
- "Must be (broadcast|non-broadcast|point-to-multipoint|point-to-point)"
+syntax:expression: $VAR(@) in "non-broadcast"; \
+ "Must be non-broadcast"
+
+allowed:echo non-broadcast
update:expression: "${vyatta_sbindir}/vyatta-vtysh.pl \
-c \"configure terminal\" -c \"interface $VAR(../../../@)\" \
@@ -12,7 +14,4 @@ delete:expression: "${vyatta_sbindir}/vyatta-vtysh.pl \
-c \"no ip ospf network \"; "
comp_help: possible completions:
- broadcast Set broadcast network type
non-broadcast Set non-broadcast network type
- point-to-multipoint Set point-to-multipoint network type
- point-to-point Set point-to-point network type
diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/attribute-unchanged/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/attribute-unchanged/node.def
index 9e6db64e..0439166e 100644
--- a/templates/protocols/bgp/node.tag/neighbor/node.tag/attribute-unchanged/node.def
+++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/attribute-unchanged/node.def
@@ -7,17 +7,21 @@ end: ${vyatta_sbindir}/vyatta-vtysh.pl -noerr -c "configure terminal" -c "route
if [ -f "/tmp/bgp-neighbor-$VAR(../@)-attribute-unchanged.$PPID" ]; then
rm -rf /tmp/bgp-neighbor-$VAR(../@)-attribute-unchanged.$PPID;
else
- if [ -n "$VAR(./as-path/@)" ]; then
- cond="as-path " ;
- fi ;
- if [ -n "$VAR(./med/@)" ]; then
- cond="$cond med " ;
- fi ;
- if [ -n "$VAR(./next-hop/@)" ]; then
- cond="$cond next-hop " ;
- fi ;
- if [ -n "$VAR(../remote-as/@)" ]; then
- peer="remote-as $VAR(../remote-as/@)";
+ ## the calls to check-typeless-node should be removed when the type-less node built-in returns correctly
+ ${vyatta_sbindir}/vyatta-check-typeless-node.pl "protocols bgp $VAR(../../@) neighbor $VAR(../@) attribute-unchanged as-path"
+ if [ $? -eq 0 ]; then
+ cond="as-path " ;
+ fi ;
+ ${vyatta_sbindir}/vyatta-check-typeless-node.pl "protocols bgp $VAR(../../@) neighbor $VAR(../@) attribute-unchanged med"
+ if [ $? -eq 0 ]; then
+ cond="$cond med " ;
+ fi ;
+ ${vyatta_sbindir}/vyatta-check-typeless-node.pl "protocols bgp $VAR(../../@) neighbor $VAR(../@) attribute-unchanged next-hop"
+ if [ $? -eq 0 ]; then
+ cond="$cond next-hop " ;
+ fi ;
+ if [ -n "$VAR(../remote-as/@)" ]; then
+ peer="remote-as $VAR(../remote-as/@)";
else
peer="peer-group $VAR(../peer-group/@)";
fi;
diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/local-as/local-as/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/local-as/local-as/node.def
index c70dba65..f4277aad 100644
--- a/templates/protocols/bgp/node.tag/neighbor/node.tag/local-as/local-as/node.def
+++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/local-as/local-as/node.def
@@ -2,6 +2,6 @@ type: u32
help: Set the local AS number
comp_help: \1 <1-4294967294>\tlocal AS number
syntax:expression: $VAR(@) >=1 && $VAR(@) <= 4294967294; "local-as must be between 1 and 4294967294"
-syntax:expression: $VAR(@) != $VAR(../../../@); "Cannot have local-as same as BGP AS number"
+commit:expression: $VAR(@) != $VAR(../../../@); "protocols bgp $VAR(../../../@) neighbor $VAR(../../@): you can't set local-as the same as the router AS"
commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../../@) --neighbor $VAR(../../@)"
commit:expression: $VAR(../peer-group/) == ""; "protocols bgp $VAR(../../../@) neighbor $VAR(../../@): you can't set local-as for a neighbor in a peer-group"
diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/remote-as/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/remote-as/node.def
index 75b0f3a7..c10df2e1 100644
--- a/templates/protocols/bgp/node.tag/neighbor/node.tag/remote-as/node.def
+++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/remote-as/node.def
@@ -4,5 +4,7 @@ comp_help: \1 <1-4294967294>\tAS number
syntax:expression: $VAR(@) >= 1 && $VAR(@) <= 4294967294; "remote-as must be between 1 and 4294967294"
update: ${vyatta_sbindir}/vyatta-vtysh.pl -c "configure terminal" -c "router bgp $VAR(../../@)" \
-c "neighbor $VAR(../@) remote-as $VAR(@)"
-delete: ${vyatta_sbindir}/vyatta-vtysh.pl -c "configure terminal" -c "router bgp $VAR(../../@)" \
- -c "no neighbor $VAR(../@) remote-as $VAR(@)"
+# commented out because deleting anything after remote-as will cause a failure in Quagga
+# this is a temporary fix until node ordering is enabled
+#delete: ${vyatta_sbindir}/vyatta-vtysh.pl -c "configure terminal" -c "router bgp $VAR(../../@)" \
+# -c "no neighbor $VAR(../@) remote-as $VAR(@)"
diff --git a/templates/protocols/bgp/node.tag/parameters/dampening/node.def b/templates/protocols/bgp/node.tag/parameters/dampening/node.def
index a86cbe79..5d71fca0 100644
--- a/templates/protocols/bgp/node.tag/parameters/dampening/node.def
+++ b/templates/protocols/bgp/node.tag/parameters/dampening/node.def
@@ -1,11 +1,12 @@
help: Enable route-flap dampening
delete:expression: "touch /tmp/bgp-dampening.$PPID"
-end: ${vyatta_sbindir}/vyatta-vtysh.pl -c "configure terminal" -c "router bgp $VAR(../../@)" \
- -c "no bgp dampening" ;
- if [ -f "/tmp/bgp-dampening.$PPID" ]; then
- rm -f "/tmp/bgp-dampening.$PPID" ;
- else
+# Note that there is a bug in quagga here. If bgpd gets two 'no bgp dampening'
+# commands in a row it will crash
+end: if [ -f "/tmp/bgp-dampening.$PPID" ]; then
${vyatta_sbindir}/vyatta-vtysh.pl -c "configure terminal" -c "router bgp $VAR(../../@)" \
- -c "bgp dampening $VAR(./half-life/@) $VAR(./re-use/@) $VAR(./start-suppress-time/@) $VAR(./max-suppress-time/@)" ;
- fi ;
-
+ -c "no bgp dampening" ;
+ rm -f "/tmp/bgp-dampening.$PPID" ;
+ else
+ ${vyatta_sbindir}/vyatta-vtysh.pl -c "configure terminal" -c "router bgp $VAR(../../@)" \
+ -c "bgp dampening $VAR(./half-life/@) $VAR(./re-use/@) $VAR(./start-suppress-time/@) $VAR(./max-suppress-time/@)" ;
+ fi ;